<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel>
	  <title>Ask MetaFilter questions tagged with GameProgramming</title>
      <link>http://ask.metafilter.com/tags/GameProgramming</link>
      <description>Questions tagged with 'GameProgramming' at Ask MetaFilter.</description>
	  <pubDate>Sat, 21 Nov 2009 19:18:12 -0800</pubDate> <lastBuildDate>Sat, 21 Nov 2009 19:18:12 -0800</lastBuildDate>

      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>	  
	<item>
	<title>You hit Duke. Duke is killed.</title>
	<link>http://ask.metafilter.com/138754/You%2Dhit%2DDuke%2DDuke%2Dis%2Dkilled</link>	
	<description>I&apos;m trying to teach myself Java by writing a simple roguelike. Can you help me figure out the architecture? I&apos;m totally new to Java. I just installed NetBeans this evening. I&apos;ve been tinkering around with the Swing library.&lt;br&gt;
&lt;br&gt;
One of the reasons I &lt;em&gt;want&lt;/em&gt; to learn Java is to enhance my architectural chops. I&apos;m reasonably comfortable with OOP (mainly in PHP5, which lacks some of the more exotic OO features), and I&apos;ve read a couple of books on design patterns (and I know that patterns are not a magic bullet), but I still struggle with architecture.&lt;br&gt;
&lt;br&gt;
The specific concern I&apos;m wondering about is how to delegate control to various parts of the program as the player negotiates menus, enters different modes and interfaces in the game, etc.&lt;br&gt;
&lt;br&gt;
For example, the first thing the player will see is the main menu. From here, they can start a new game, load a saved one, or view the high score table.&lt;br&gt;
&lt;br&gt;
Let&apos;s say they choose the latter. My program needs to pass control over to the class responsible for displaying the high score view. When the user dismisses that view, the system should automatically return control to the main menu.&lt;br&gt;
&lt;br&gt;
Now let&apos;s say they start a new game. Control is passed over to the main game engine, which renders a map, player statistics, etc.&lt;br&gt;
&lt;br&gt;
The user presses &quot;r&quot; to read an item from their inventory. Control is passed over to a menuing widget which displays all readable items in their backpack, and allows them to select one with the up/down keys. The player can cancel the action with Esc (which simply returns control to the previous subsystem in the chain&#8212;&lt;em&gt;i.e.&lt;/em&gt;, the main game engine), or select the highlighted item by pressing Enter.&lt;br&gt;
&lt;br&gt;
Perhaps the player later encounters a minigame&#8212;let&apos;s say they can play blackjack to earn money. In this case, control gets passed to the blackjack class. When they decide they&apos;ve had enough, control is released to whatever class spawned the blackjack game.&lt;br&gt;
&lt;br&gt;
(Or they enter a city mode from an overworld map, then return to the overworld when leaving the city...you get the idea.)&lt;br&gt;
&lt;br&gt;
And, of course, when the player dies, the game engine terminates and control is automatically returned to the main menu.&lt;br&gt;
&lt;br&gt;
In other words, it&apos;s much like a call stack. I&apos;ve seen a similar system used in many programs, and I think it will work well for mine.&lt;br&gt;
&lt;br&gt;
But the web apps I&apos;m used to programming are much more linear creatures&#8212;they only receive input (&lt;em&gt;e.g.&lt;/em&gt;, POST variables) at runtime. State is entirely simulated&#8212;when it&apos;s time to move to the next step in a process, the user is simply forwarded to a new page (which is, effectively, a whole new program).&lt;br&gt;
&lt;br&gt;
So: does my proposed architecture (sketchy though it may be) make sense? Is there a name for it? And, most importantly, how do I implement it?&lt;br&gt;
&lt;br&gt;
Bonus points if you can combine this with an elegant way to separate the view/UI entirely from the game logic, so I can (for example) build the initial design with a text-only interface, and then graft a graphical mode on top later.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.138754</guid>
	<pubDate>Sat, 21 Nov 2009 19:18:12 -0800</pubDate>
	<category>gameprogramming</category>
	<category>java</category>
	<category>roguelike</category>
	<category>softwarearchitecture</category>
	<dc:creator>ixohoxi</dc:creator>
	</item>
	<item>
	<title>Learning real-time sound event synchronization C++ programming?</title>
	<link>http://ask.metafilter.com/113634/Learning%2Drealtime%2Dsound%2Devent%2Dsynchronization%2DC%2Dprogramming</link>	
	<description>What are the libraries/techniques that are available for event synchronization in C++?  More specifically, how would I go about learning the best strategies for synchronizing events (say, a graphical event with an sound, or one sound with another)?

I&apos;m looking to learn about the techniques that are used by complex games as well as audio software, like Ableton Live or Logic. I&apos;ve programmed in a number of languages and frameworks but most of the time I haven&apos;t had to think about this aspect of making (rudimentary) sound software.  I guess I don&apos;t care too much about a response being C++ specific if it helps me understand the general concepts well, but I figure that&apos;s a good place to start, since that&apos;s the language I want to use.&lt;br&gt;
&lt;br&gt;
I see that there are &lt;a href=&quot;http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio.html&quot;&gt;some&lt;/a&gt; &lt;a href=&quot;http://www.cs.wustl.edu/~schmidt/ACE.html&quot;&gt;libraries&lt;/a&gt; out there that &lt;em&gt;may&lt;/em&gt; be appropriate, but I&apos;m a relative n00b at C++ and real-time programming, and I&apos;m not sure how to proceed.  Do game/audio programmers use complex systems for syncing events, or is it &quot;not that hard?&quot;  Do they roll their own usually, or are there standard libs out there that I just don&apos;t know about?  Are there good open source projects out there that implement this sort of thing that I could look at?  Am I even asking the right questions?&lt;br&gt;
&lt;br&gt;
Many thanks!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.113634</guid>
	<pubDate>Sat, 07 Feb 2009 13:37:40 -0800</pubDate>
	<category>audioprogramming</category>
	<category>c</category>
	<category>computing</category>
	<category>gameprogramming</category>
	<dc:creator>dubitable</dc:creator>
	</item>
	<item>
	<title>Looking for an Online Generic Card Game Simulator.</title>
	<link>http://ask.metafilter.com/97736/Looking%2Dfor%2Dan%2DOnline%2DGeneric%2DCard%2DGame%2DSimulator</link>	
	<description>I need an &quot;Online Generic Card Game Simulator&quot; program (my term).  I don&apos;t think what I want exists, but I don&apos;t know how to verify this, or more importantly, how to go about making one for myself. First off, to explain what I mean by &apos;Generic Card Game Simulator&apos;, my family and friends are fairly scattered across the country (US), so playing cards like we used to isn&apos;t possible. We&apos;ve tried the MULTITUDES of online games, and while for the most part they are ok, it would be nice to tweak the game rules a bit to match our &apos;house rules&apos; (of which we seem to have quite a few).&lt;br&gt;
&lt;br&gt;
In addition, we&apos;d love to also have a poker program that would allow us to create all of our &quot;Dealer&apos;s Choice&quot; games. &lt;br&gt;
&lt;br&gt;
I&apos;ve looked online and I haven&apos;t seen any such program that fits these requirements, thus I&apos;ve been thinking of ways to code it.&lt;br&gt;
&lt;br&gt;
I&apos;ve done a lot of &quot;hobby&quot; game coding, and while my field is aerospace engineering, I spend probably 50% of my time coding in VB at work.  I can think of a few ways to go about creating the guts of the program, so I&apos;m not looking for help there. That&apos;s the fun part.  What I can&apos;t figure out is how to determine which language would be best suited to use, and the most efficient way to tackle it.&lt;br&gt;
&lt;br&gt;
From my own research and experience, I assumed finding an Open Source Java &quot;Web Card Game&quot; project would be the simplest, but man, there&apos;s so much out there, I have no clue how to filter the signal from the noise.  After downloading a couple IDEs and checking out a few tutorials (all geared toward complete programming newbies), I got frustrated and started googling some more.&lt;br&gt;
&lt;br&gt;
I know this has been a rambling post, but I really don&apos;t have a good feeling on where to start.  &lt;br&gt;
&lt;br&gt;
In Summary:&lt;br&gt;
1. Has anyone heard of such a Game/Program online? (free or commercial)&lt;br&gt;
2. Has anyone heard of anyone attempting such a project?&lt;br&gt;
3. Does anyone have any tips or advice on how to get started (specifically on how to deal with the network aspects of an online server based game, if that indeed is the best route)&lt;br&gt;
&lt;br&gt;
Other Relevant info:&lt;br&gt;
As a non-CompSci Engineer, I&apos;ve had to pick up a smattering of various coding languages throughout the years, including:&lt;br&gt;
C++, VB, Javascript, Unix Scripting, *some* Perl, HTML (yea, I know it&apos;s not &apos;coding&apos;), and a couple other Engine-specific game programming languages (based loosely on C++).  I have no problem in learning a new language (and realize there might be a rather steep learning curve to get through)&lt;br&gt;
&lt;br&gt;
Thanks.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.97736</guid>
	<pubDate>Mon, 28 Jul 2008 13:34:46 -0800</pubDate>
	<category>Cards</category>
	<category>GameProgramming</category>
	<category>Java</category>
	<category>OpenSource</category>
	<category>Poker</category>
	<category>Programming</category>
	<dc:creator>johnstein</dc:creator>
	</item>
	
	</channel>
</rss>

