<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Life of a Game Designer</title>
	<atom:link href="http://daveyounggames.com/Index.php?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://daveyounggames.com</link>
	<description>Forward seeking always reaching</description>
	<lastBuildDate>Mon, 25 Apr 2011 18:14:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>1MonthGame: Monster Meadow</title>
		<link>http://daveyounggames.com/?p=519</link>
		<comments>http://daveyounggames.com/?p=519#comments</comments>
		<pubDate>Mon, 25 Apr 2011 18:14:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://daveyounggames.com/?p=519</guid>
		<description><![CDATA[4 Week Interlude! Last week I was doing my usual perusing of the Twitter feed when I came across this update: http://twitter.com/#!/S0phieH/status/60644300224077824 ok, so starting today I am working on my#1MonthGame, it will be finished on the 18th of may, and released shortly after, wish me luck This grabbed my attention, as I needed to <a href='http://daveyounggames.com/?p=519'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>4 Week Interlude!</p>
<p>Last week I was doing my usual perusing of the Twitter feed when I came across this update:</p>
<p><a href="http://twitter.com/#!/S0phieH/status/60644300224077824">http://twitter.com/#!/S0phieH/status/60644300224077824</a></p>
<pre>ok, so starting today I am working on my<a title="#1MonthGame" rel="nofollow" href="http://twitter.com/#!/search?q=%231MonthGame">#1MonthGame</a>, it will be finished on the 18th of may, and released shortly after, wish me luck <img src='http://daveyounggames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </pre>
<p>This grabbed my attention, as I needed to jumpstart my game *creation* again. After spending a couple of months on my multiplayer framework, I had a few game ideas for it but found myself procrastinating on actual development.  So I decided to do &#8216;join&#8217; her in assigning a 4 week deadline to a new game, from scratch. We both used a #1MonthGame hashtag, so next thing you know, 2 others decided to do it too. She made a website for people to post their blogs (1 post a day) called <a href="http://1monthgame.com" target="_blank">1MonthGame.com</a>, and more projects joined up. You can join at any time, and give yourself a 4 week deadline from the day you post your project idea. The projects should be from scratch if you can swing it, though it&#8217;s not a *rule*. Actually, it&#8217;s not a competition, just a peer accountability deadline structure.</p>
<p>It&#8217;s neat because it forces you to focus on the small, playable, fun parts of a game. My idea, Monster Meadow, is based off some very simple game mechanics involving attracting critters and monsters, and I am making it for my 3 year old daughter to play on the iPad.  The name of the &#8216;bad guy&#8217; monsters is Gullygog. This is a word my 1 year old boy says, we don&#8217;t really know what it means <img src='http://daveyounggames.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   I am doing the artwork myself when possible, and I am horrible at art so the shapes will be simple. It&#8217;s a simple kind of simulation and interaction game, and of a kind I&#8217;ve never tried before.</p>
<p>So I &#8216;ll be posting over on the 1MonthGame blog for the next 4 weeks <img src='http://daveyounggames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This will help me get back into the game creation portion of development and stop focusing on tech so much, and allow me to move forward with my main projects.</p>
<p><a href="http://www.1monthgame.com/blog/?tag=monstermeadow">http://www.1monthgame.com/blog/?tag=monstermeadow</a></p>
]]></content:encoded>
			<wfw:commentRss>http://daveyounggames.com/?feed=rss2&#038;p=519</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook/Shiva Sample Project</title>
		<link>http://daveyounggames.com/?p=513</link>
		<comments>http://daveyounggames.com/?p=513#comments</comments>
		<pubDate>Tue, 19 Apr 2011 04:51:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://daveyounggames.com/?p=513</guid>
		<description><![CDATA[This will save you some major pain. About a year ago to the day I wrestled with the Facebook API and Shiva. I got something partially working, but it was broken beyond belief in IE. This is because I was relying too heavily on Javascript to do things, and couldn&#8217;t safely call Javascript functions from <a href='http://daveyounggames.com/?p=513'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>This will save you some major pain.</p>
<p>About a year ago to the day I wrestled with the Facebook API and Shiva. I got something partially working, but it was broken beyond belief in IE. This is because I was relying too heavily on Javascript to do things, and couldn&#8217;t safely call Javascript functions from within Shiva when IE was involved.</p>
<p>So every few months I went back to <a href="http://developers.facebook.com" target="_blank">http://developers.facebook.com</a>, grabbed the latest php SDK from github, and tried things out. A pattern emerged. I could usually get a little of the way there (enough to make me feel like continuing) but never enough to work on all the browsers I wanted without breaking.</p>
<p>This time I tried something different! After trying and failing again many times in rapid succession today, I was ready to throw in the towel. But I tried something a little subtler, and then expanded on it. When I got into trouble, I scoured the web for similar solutions I could build on. In particular, I found a nice class structure here: <a href="http://johnklingelhoets.com/facebook-api-graph-oauth-class/" target="_blank">http://johnklingelhoets.com/facebook-api-graph-oauth-class/</a></p>
<p>I used a good part of this for the wall post and user info stuff.</p>
<p>So.. without further ado, I present to you the Facebook/Shiva Sample Integration. <a href="../wp-content/uploads/2011/04/BasicShivaFacebookPHP.zip">Click to Download the Files</a></p>
<p>It&#8217;s very basic. It will get you authenticated, grab the user&#8217;s Facebook info for use inside Shiva (even their profile pic), and give you a way to post to their wall from the app. It uses all php and no Javascript for the Facebook portions. Basically, index.php authenticates the user and asks for certain permissions using the new OAuth format. When permission is granted, the flow returns to this page, and the signed result is stored in a cookie. Control is then passed to the Shiva application page. From within, Shiva makes a call to get the Facebook User Information to fbfunctions.php. It looks at the cookie and uses the token in it to make a call to the Facebook Graph API to grab all the user information we&#8217;re interested in. An XML blob is built and sent back to Shiva.</p>
<p>If you hit the wall post button, a simple text message is urlencoded and sent to the fbfunctions.php. You can add a lot more to this, and also use an XML block with lots more data for variety. Please look at <a href="http://developers.facebook.com" target="_blank">http://developers.facebook.com</a> and the Graph API links within to see what else you can do, I can&#8217;t help you in that area.</p>
<h2>One of the trickiest parts is setting up the new application.</h2>
<p>If you go to <a href="http://www.facebook.com/developers/" target="_blank">http://www.facebook.com/developers/</a> you will probably see a blog post, and on the right hand side is a button which says &#8216;Set Up New App&#8217;. Click it. If you can&#8217;t find it, try this link instead: <a href="http://www.facebook.com/developers/createapp.php" target="_blank">http://www.facebook.com/developers/createapp.php</a></p>
<p>There are many settings. I pick the defaults for the most part.</p>
<p>At a minimum, you will need two settings in here:</p>
<ul>
<li>Facebook Integration-&gt;Canvas Page (this is where your app can be found on Facebook)</li>
<li>Facebook Integration-&gt;Canvas URL (this is the full path to your application on your own web server, ie http://mywebsite.com/mygame/fb/)</li>
</ul>
<p>People get hung up on the canvas url. There are lots of different ways to do things. Facebook requires this url to end with a /</p>
<p>I usually put all my Facebook files in an /fb subfolder with no other subfolders, so I have the main folders to do website stuff with.</p>
<p>So, in my web structure I have:</p>
<p>http://mywebsite.com/mygame/fb</p>
<p>and in that folder are ALL of the files included in the zip file. Facebook is going to be looking for index.php (the default file for the path). I&#8217;m not sure if the cert file is needed, I included it anyway.</p>
<p>This should contain:</p>
<ul>
<li>index.php (the initial file. Modify this and add your App ID and canvas URL from the Facebook Application Setup)</li>
<li>gamepage.php (this is really just a basic .html file, but I made it a php file to help it not be cached. It is the normal Shiva web player page)</li>
<li>fbfunctions.php (this is called from within Shiva, and passed an op parameter to decide what to do. Results are in xml)</li>
<li>fbclass.php (this is included in fbfunctions.php and has functions for wall posting and other cool things. Not written by me)</li>
</ul>
<p>You will need to include the FacebookAPI.ste in your Shiva project and change the base site URL in onInit (you&#8217;ll get a message about it)</p>
<p>After that, feel free to check out the code. You&#8217;ll notice I am not using any of the official Facebook API or SDK stuff from GitHub, feel free to add to this implementation. I am going to be staying away from anything involving lightboxes myself, but be warned that if you want those little boxes to pop up over your Shiva game for things like inviting friends, you&#8217;re in for a whole separate ballgame.</p>
<p>I won&#8217;t be able to help you too much with problems, everyone&#8217;s setup is different and I am NOT a web coder <img src='http://daveyounggames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://daveyounggames.com/?feed=rss2&#038;p=513</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>RPG Kit Full Code Drop &#8211; Version 0.1</title>
		<link>http://daveyounggames.com/?p=506</link>
		<comments>http://daveyounggames.com/?p=506#comments</comments>
		<pubDate>Mon, 14 Mar 2011 05:53:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RPGKit]]></category>
		<category><![CDATA[iPhone Game Development]]></category>
		<category><![CDATA[iPhone MMO]]></category>
		<category><![CDATA[Shiva3D]]></category>

		<guid isPermaLink="false">http://daveyounggames.com/?p=506</guid>
		<description><![CDATA[OK, ladies and gents. Here is the code drop. There are a great many things to document in here, but tonight you are getting just the code, because it&#8217;s 1:45AM and it&#8217;s been a busy weekend! I promised myself I would begin game design tonight, so I don&#8217;t have the chance to create docs yet. <a href='http://daveyounggames.com/?p=506'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>OK, ladies and gents. Here is the code drop. There are a great many things to document in here, but tonight you are getting just the code, because it&#8217;s 1:45AM and it&#8217;s been a busy weekend!</p>
<p>I promised myself I would begin game design tonight, so I don&#8217;t have the chance to create docs yet. Go over the xml files thoroughly. I&#8217;ve given you the power to make something incredible here, and there aren&#8217;t many bugs in it.</p>
<p>Keep in mind that everything model/data related is driven via the xml files, beginning with DataFiles.xml.</p>
<p>The initial data file location is specified in: RPGData.GetXMLFileList_onEnter</p>
<p>You will also need to set your own server IP/Port in: Network_Connection.onInit</p>
<p><a href="http://daveyounggames.com/wp-content/uploads/2011/03/RPGDemo-FullCodeDrop-v11.zip">RPGDemo-FullCodeDrop-v1</a> (315KB)</p>
<p><strong>Usage: You have permission to use this as-is in projects, but not to sell the code. It took me months to get it to this point, don&#8217;t steal my work and pass it off as your own in this way. I&#8217;d appreciate a shout-out for any error fixes/improvements or just to let me know if you use it to make a game <img src='http://daveyounggames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<p>The entire size of the Engine right now is around 350KB. It loads its data at runtime as needed, based on the XML settings.</p>
<p>Feel free to drop by the IRC Chat with questions. I will send up some documentation as I can.</p>
<p>Quick feature list:</p>
<ul>
<li>Full XML Data System</li>
<li>External asset streaming</li>
<li>Loading HUD system</li>
<li>Game Lobby</li>
<li>Password Protected Game Hosting</li>
<li>XML Based Entity Definition</li>
<li>Basic AI Player</li>
<li>Targetting</li>
<li>Target Information System</li>
<li>Multiplayer</li>
<li>Lag Smoothing</li>
<li>Chat System</li>
<li>Chat Commands</li>
<li>Server Menu</li>
<li>XML Based Menu System</li>
<li>Server Object Creation</li>
<li>Raycast-Based Combat</li>
<li>Server-Based Rules Lawyering</li>
<li>Networked Object Template</li>
<li>Jumping/Charged Jumping</li>
<li>Orbiting/Zooming Player Camera</li>
<li>Slow/Fast/Speed Adjustment</li>
<li>Flying</li>
<li>Click-Based Spawning</li>
<li>Auto-Server Swapping</li>
<li>Shadows/Fake Shadows</li>
<li>Platform Detection</li>
<li>Configurable Object Network Affinity</li>
<li>Configurable Spawners</li>
<li>Scene Changing/Portalling</li>
<li>Networked Dynamic Field Manipulation</li>
<li>Equipping</li>
<li>Weapon Mounting</li>
</ul>
<p><strong>Have fun! You have permission to use this as-is, but not to sell the code to anyone. I&#8217;d appreciate a shout-out for any error fixes/improvements or just to let me know if you use it to make a game <img src='http://daveyounggames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://daveyounggames.com/?feed=rss2&#038;p=506</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>RPG Kit: Weapon Equipping</title>
		<link>http://daveyounggames.com/?p=503</link>
		<comments>http://daveyounggames.com/?p=503#comments</comments>
		<pubDate>Wed, 09 Mar 2011 03:42:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RPGKit]]></category>
		<category><![CDATA[iPhone Game Development]]></category>
		<category><![CDATA[iPhone MMO]]></category>

		<guid isPermaLink="false">http://daveyounggames.com/?p=503</guid>
		<description><![CDATA[Tonight&#8217;s major goal was to go to bed early. That&#8230; and to do weapon equipping! I could cheat a little bit because I have done this before and had a perfectly working shape mounting and mount node function from CastleGuard2. But setting up some data for the items, deciding how to pass it around efficiently, <a href='http://daveyounggames.com/?p=503'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Tonight&#8217;s major goal was to go to bed early. That&#8230; and to do weapon equipping! I could cheat a little bit because I have done this before and had a perfectly working shape mounting and mount node function from CastleGuard2. But setting up some data for the items, deciding how to pass it around efficiently, and assigning a weapon to myself by default was much trickier.</p>
<p>Here&#8217;s a little video of how it all worked out tonight.</p>
<p><a href="http://www.youtube.com/watch?v=wJFOXTIRoXg"><span class="youtube">
<object width="425" height="362">
<param name="movie" value="http://www.youtube.com/v/wJFOXTIRoXg?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/wJFOXTIRoXg?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="362"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=wJFOXTIRoXg">www.youtube.com/watch?v=wJFOXTIRoXg</a></p></a></p>
<p>Item Equipping Complete! (Basic version)</p>
]]></content:encoded>
			<wfw:commentRss>http://daveyounggames.com/?feed=rss2&#038;p=503</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RPG Kit: Data Caching in Action</title>
		<link>http://daveyounggames.com/?p=501</link>
		<comments>http://daveyounggames.com/?p=501#comments</comments>
		<pubDate>Wed, 09 Mar 2011 02:19:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RPGKit]]></category>
		<category><![CDATA[iPhone MMO]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mmo]]></category>

		<guid isPermaLink="false">http://daveyounggames.com/?p=501</guid>
		<description><![CDATA[I am starting on weapons tonight, and I really wanted to test out the data loading system I kicked this whole project off with. So I devised a quick test for the data caching. I added a &#60;sources&#62; block to my entities file, added a few named remote data sources that contain models/textures, and let <a href='http://daveyounggames.com/?p=501'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I am starting on weapons tonight, and I really wanted to test out the data loading system I kicked this whole project off with. So I devised a quick test for the data caching.</p>
<p>I added a &lt;sources&gt; block to my entities file, added a few named remote data sources that contain models/textures, and let er rip. This makes my framework itself around 360kb as a web plugin, and the art of course caches when it downloads.</p>
<p>Here&#8217;s what happened!</p>
<p><a href="http://www.youtube.com/watch?v=Z522Gmm-06M"><span class="youtube">
<object width="425" height="362">
<param name="movie" value="http://www.youtube.com/v/Z522Gmm-06M?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/Z522Gmm-06M?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="362"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=Z522Gmm-06M">www.youtube.com/watch?v=Z522Gmm-06M</a></p></a></p>
]]></content:encoded>
			<wfw:commentRss>http://daveyounggames.com/?feed=rss2&#038;p=501</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RPG Kit Update: Recent Game Dev Videos</title>
		<link>http://daveyounggames.com/?p=495</link>
		<comments>http://daveyounggames.com/?p=495#comments</comments>
		<pubDate>Tue, 08 Mar 2011 17:39:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RPGKit]]></category>
		<category><![CDATA[iPhone Game Development]]></category>
		<category><![CDATA[iPhone MMO]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mmo]]></category>
		<category><![CDATA[RPG]]></category>

		<guid isPermaLink="false">http://daveyounggames.com/?p=495</guid>
		<description><![CDATA[Check out the latest dev videos from the dev cave! I&#8217;ve been doing lots of late nights over the last week, borne out of passion and pure drive. Got to strike while the iron is hot! I&#8217;ve given myself a deadline of this Sunday night to have the framework stable enough to be able to <a href='http://daveyounggames.com/?p=495'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Check out the latest dev videos from the dev cave! I&#8217;ve been doing lots of late nights over the last week, borne out of passion and pure drive. Got to strike while the iron is hot!</p>
<p>I&#8217;ve given myself a deadline of this Sunday night to have the framework stable enough to be able to begin working on a game project with it. There&#8217;s still a ton to do. Before I begin the game project, I will do a quick wrap-up of the codebase as it is then and give it a once-over for new functionality. I may have some time to draw up some short documentation, but it&#8217;s not bloody likely right now. I can definitely &#8216;freeze&#8217; the codebase so that I can go back to it and do more documentation and pattern cleansing after I&#8217;ve sent out a game.</p>
<p>So, without further ado, here are my recent vids since the last update.  Oldest first.</p>
<p><strong>3/1 Gremlins. </strong>A first test of swapping out the player model and creating an AI entity with it</p>
<p><a href="http://www.youtube.com/watch?v=NECSYgU7CJs"><span class="youtube">
<object width="425" height="362">
<param name="movie" value="http://www.youtube.com/v/NECSYgU7CJs?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/NECSYgU7CJs?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="362"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=NECSYgU7CJs">www.youtube.com/watch?v=NECSYgU7CJs</a></p></a></p>
<p><strong>3/2 iPad Test</strong>. A test of the framework on the iPad (I try to do this once a week or so), recorded on the iPhone. Bad quality, but the point is clear</p>
<p><a href="http://www.youtube.com/watch?v=Em1K2Rm7GTQ"><span class="youtube">
<object width="425" height="362">
<param name="movie" value="http://www.youtube.com/v/Em1K2Rm7GTQ?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/Em1K2Rm7GTQ?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="362"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=Em1K2Rm7GTQ">www.youtube.com/watch?v=Em1K2Rm7GTQ</a></p></a></p>
<p><strong>3/4 Server Commands</strong>. An XML menu framework for performing commands on the server out of a GUI</p>
<p><a href="http://www.youtube.com/watch?v=bPRUTcbzLOA"><span class="youtube">
<object width="425" height="362">
<param name="movie" value="http://www.youtube.com/v/bPRUTcbzLOA?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/bPRUTcbzLOA?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="362"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=bPRUTcbzLOA">www.youtube.com/watch?v=bPRUTcbzLOA</a></p></a></p>
<p><strong>3/5 Gremlin Overdose</strong>. Using spawners to make a whole ton of critters</p>
<p><a href="http://www.youtube.com/watch?v=1phU6kI0Lwg"><span class="youtube">
<object width="425" height="362">
<param name="movie" value="http://www.youtube.com/v/1phU6kI0Lwg?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/1phU6kI0Lwg?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="362"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=1phU6kI0Lwg">www.youtube.com/watch?v=1phU6kI0Lwg</a></p></a></p>
<p><strong>3/5 Monster Attack Range Test</strong>. The beginnings of intelligence</p>
<p><a href="http://www.youtube.com/watch?v=98avWEDolnc"><span class="youtube">
<object width="425" height="362">
<param name="movie" value="http://www.youtube.com/v/98avWEDolnc?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/98avWEDolnc?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="362"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=98avWEDolnc">www.youtube.com/watch?v=98avWEDolnc</a></p></a></p>
<p><strong>3/6 Portal/Zoning Test</strong>. I love this stuff!</p>
<p><a href="http://www.youtube.com/watch?v=5_B4TDLmQp8"><span class="youtube">
<object width="425" height="362">
<param name="movie" value="http://www.youtube.com/v/5_B4TDLmQp8?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/5_B4TDLmQp8?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="362"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=5_B4TDLmQp8">www.youtube.com/watch?v=5_B4TDLmQp8</a></p></a></p>
<p><strong>3/7 Chat Tweaks</strong>. Also, I pull a monster and he decides to go burrowing <img src='http://daveyounggames.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://www.youtube.com/watch?v=GWMiDeu8l1o"><span class="youtube">
<object width="425" height="362">
<param name="movie" value="http://www.youtube.com/v/GWMiDeu8l1o?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/GWMiDeu8l1o?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="362"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=GWMiDeu8l1o">www.youtube.com/watch?v=GWMiDeu8l1o</a></p></a></p>
<p><strong>3/7 AI Zerg Test. </strong>I wonder how many AI I can run in the web player? I find out.. plenty!</p>
<p><a href="http://www.youtube.com/watch?v=OV_W1wvWeKk"><span class="youtube">
<object width="640" height="403">
<param name="movie" value="http://www.youtube.com/v/OV_W1wvWeKk?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/OV_W1wvWeKk?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="403"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=OV_W1wvWeKk&fmt=18">www.youtube.com/watch?v=OV_W1wvWeKk</a></p></a></p>
]]></content:encoded>
			<wfw:commentRss>http://daveyounggames.com/?feed=rss2&#038;p=495</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RPG Kit: Servers, AI Objects, Lobby Targetting, Platforms, Chat Commands</title>
		<link>http://daveyounggames.com/?p=464</link>
		<comments>http://daveyounggames.com/?p=464#comments</comments>
		<pubDate>Mon, 28 Feb 2011 18:08:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RPGKit]]></category>
		<category><![CDATA[iPhone Game Development]]></category>

		<guid isPermaLink="false">http://daveyounggames.com/?p=464</guid>
		<description><![CDATA[License to Use: You can use the code and tutorials presented within freely for your own projects. If you use anything here, I&#8217;d appreciate a credit, and also appreciate it if you drop me a line to let me know! This is a very large update with a lot of refactoring, and many small pieces <a href='http://daveyounggames.com/?p=464'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><strong>License to Use: You can use the code and tutorials presented within freely for your own projects. If you use anything here, I&#8217;d appreciate a credit, and also appreciate it if you drop me a line to let me know!</strong></p>
<p>This is a very large update with a lot of refactoring, and many small pieces left undone. It&#8217;s been about 10 days since the last code drop, and a lot of new things have gone into the codebase. This will probably be my last code drop for a while, as I am now going game-specific. So I&#8217;ve tried to add as much as possible.</p>
<p><strong>Some of the old things have been broken, like the rudimentary combat I put in awhile ago. You&#8217;ll need to code your own AIEntity networking events, but you should know how to do that by now, I&#8217;ve moved the objects to a generic Net Object framework you can build on. Check the bottom of the post for an example. I also modified the player controller/camera quite heavily from the original style.</strong></p>
<p><strong><br /></strong></p>
<p><strong>Chat Commands Addendum</strong></p>
<p>I forgot to add to the .pdf, I&#8217;ve also added in the basics for chat commands you can use ingame.</p>
<p>If you know the tag of an object, you can do this:</p>
<p>\cmd objecttag ainame handler param1 param2 param3</p>
<p>To call a handler on any object with a tag on it.</p>
<p><strong><em>With the addition of some php/mysql calls, you now have everything you need to build an MMO. Seriously.</em></strong></p>
<p>The included .pdf describes the major changed areas and some pertinent functions/flow.</p>
<ul>
<li>Lobbies- Join/Host</li>
<li>Targetting</li>
<li>Auto-Swap Client Server</li>
<li>Server Objects</li>
<li>Moving Platforms</li>
<li>Monster Flocking</li>
</ul>
<p><a href="http://daveyounggames.com/wp-content/uploads/2011/02/RPGDemo-Platforms-Server-AI-Targetting.zip">RPGDemo-Platforms-Server-AI-Targetting</a> (Full Project Archive)</p>
<p><a href="http://daveyounggames.com/wp-content/uploads/2011/02/RPGSeriesMultiplayerFramework-3.pdf">RPGSeriesMultiplayerFramework-3</a> (PDF)</p>
<p>Some Videos from the development process:</p>
<p><strong>Initial Server Object Experiment:</strong></p>
<p><a href="http://www.youtube.com/watch?v=6l-npBVyC6k"><span class="youtube">
<object width="640" height="403">
<param name="movie" value="http://www.youtube.com/v/6l-npBVyC6k?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/6l-npBVyC6k?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="403"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=6l-npBVyC6k&fmt=18">www.youtube.com/watch?v=6l-npBVyC6k</a></p></a></p>
<p><strong>Networked Platforms</strong></p>
<p><a href="http://www.youtube.com/watch?v=-CZHKJsPIkk"><span class="youtube">
<object width="640" height="403">
<param name="movie" value="http://www.youtube.com/v/-CZHKJsPIkk?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/-CZHKJsPIkk?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="403"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=-CZHKJsPIkk&fmt=18">www.youtube.com/watch?v=-CZHKJsPIkk</a></p></a></p>
<p><strong>Platform Control</strong></p>
<p><a href="http://www.youtube.com/watch?v=mUBj86SDffc"><span class="youtube">
<object width="640" height="403">
<param name="movie" value="http://www.youtube.com/v/mUBj86SDffc?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/mUBj86SDffc?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="403"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=mUBj86SDffc&fmt=18">www.youtube.com/watch?v=mUBj86SDffc</a></p></a></p>
<p><strong>Initial Zombies</strong></p>
<p><a href="http://www.youtube.com/watch?v=FPBb3nwkJyA"><span class="youtube">
<object width="640" height="403">
<param name="movie" value="http://www.youtube.com/v/FPBb3nwkJyA?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/FPBb3nwkJyA?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="403"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=FPBb3nwkJyA&fmt=18">www.youtube.com/watch?v=FPBb3nwkJyA</a></p></a></p>
<p><strong>Test of Server Swapping</strong></p>
<p><a href="http://www.youtube.com/watch?v=Qc8hnLGbOAM"><span class="youtube">
<object width="640" height="403">
<param name="movie" value="http://www.youtube.com/v/Qc8hnLGbOAM?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/Qc8hnLGbOAM?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="403"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=Qc8hnLGbOAM&fmt=18">www.youtube.com/watch?v=Qc8hnLGbOAM</a></p></a></p>
<p><strong>Creature Flocking/Targetting</strong></p>
<p><a href="http://www.youtube.com/watch?v=G4Xuyt-Oz9g"><span class="youtube">
<object width="640" height="403">
<param name="movie" value="http://www.youtube.com/v/G4Xuyt-Oz9g?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/G4Xuyt-Oz9g?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="403"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=G4Xuyt-Oz9g&fmt=18">www.youtube.com/watch?v=G4Xuyt-Oz9g</a></p></a></p>
<p> </p>
<p> </p>
<p><strong>[Edit] AIEntity and NetObjectAI Update</strong></p>
<p>After putting out this code drop, I needed to implement the sub AI net events on AIEntity, so here are the updated AI Modules that were affected by the change. Basically, when NetObjectAI is doing its roundup for packNetUpdate, it goes and checks the tPacket table in the child AI (AIEntity). If there&#8217;s stuff in there, it adds it to the outgoing queue, forces the update, and empties the child table. All the child AI needs to do is add packets to the table, and handle the unpack. I am reserving event numbers 30+ for child AIs.</p>
<p><a href="http://daveyounggames.com/wp-content/uploads/2011/02/AIEntity-NetObjectAI-20110228.zip">AIEntity-NetObjectAI-20110228</a> (JUST THE UPDATED AIs)</p>
]]></content:encoded>
			<wfw:commentRss>http://daveyounggames.com/?feed=rss2&#038;p=464</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>RPG Kit: Cloud-Based Server and Auto-Transferring Server</title>
		<link>http://daveyounggames.com/?p=459</link>
		<comments>http://daveyounggames.com/?p=459#comments</comments>
		<pubDate>Tue, 22 Feb 2011 14:22:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RPGKit]]></category>
		<category><![CDATA[iPhone Game Development]]></category>
		<category><![CDATA[iPhone MMO]]></category>

		<guid isPermaLink="false">http://daveyounggames.com/?p=459</guid>
		<description><![CDATA[I&#8217;ve been continuing development on my RPG Kit framework, right now it&#8217;s still the process of building out the multiplayer and networking functionality. Here are the more significant developments: Running Shiva Server on a Cloud (Rackspace) Thanks to Eric Machala (emachala on the stonetrip.com forums/irc) I know how to setup a game server in the <a href='http://daveyounggames.com/?p=459'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been continuing development on my RPG Kit framework, right now it&#8217;s still the process of building out the multiplayer and networking functionality. Here are the more significant developments:</p>
<p><strong>Running Shiva Server on a Cloud (Rackspace)</strong></p>
<p>Thanks to Eric Machala (emachala on the stonetrip.com forums/irc) I know how to setup a game server in the cloud. He posted a great How-To <a href="http://www.stonetrip.com/developer/forum/viewtopic.php?f=42&amp;t=22377">here</a>. There weren&#8217;t any code changes, and one Shiva Server license is required per server instance. The great news for this is that the Linux (Ubuntu) server runs many times faster than the dedicated Win2003 server I have on GoDaddy. It can also be scaled up at any time with the click of a button on the rackspace.com website. To be clear, this is just the Shiva Server piece which performs the connectivity for clients and relays packets/establishes channels. There isn&#8217;t a way yet to run a dedicated Shiva app itself in Linux, though I&#8217;m sure it&#8217;s coming.</p>
<p>The cost of running a server is minimal: $0.015 per hour, and a bandwidth allotment of 50GB or so. You pay as you go and can see how much bandwidth you&#8217;re using, etc. Minimum cost is $10.95 per month on Rackspace, no setup fees or other costs associated with normal duties. Once you have the server setup the way you want, you can save an image of it and fire up new servers at will (provided you have the additional licenses for the Shiva Server). If you are &#8216;cursed&#8217; with success and need to scale up rapidly, this is <strong>THE WAY</strong> to go!</p>
<p><strong>Auto-Transferring Server</strong></p>
<p>I&#8217;ve called this a few things in the past, but it&#8217;s another of the things which has stopped me from doing what I want to do in the big picture. Without the ability to run a dedicated server for logic which can run things like AI monsters and such, the only real options are to fire up Shiva clients, connect them to channels and scenes, and let them handle the AI duties. You need this if you want to have an authoritative way to make decisions for monsters, NPCs, or anything else which needs to &#8216;think&#8217; for itself and can communicate its actions to all the connected clients. In addition, you&#8217;d need one of these per channel/scene, which could be dozens or hundreds of server programs running.</p>
<p>I&#8217;ve had the theory that if I could come up with a way for any single client in a scene to run the AI, I wouldn&#8217;t need to necessarily have these dedicated game servers running. The theoretical process requires that if a client that was handling server duties dropped off or disconnected, that we could fail over gracefully to another client and they could resume the server&#8217;s responsibilities. If I can accomplish this I don&#8217;t really need to worry about spinning up new game servers for logic, only for connection loads.</p>
<p>It&#8217;s been a very complex undertaking and I&#8217;ve tried it a few times and only managed to make a bunch of spaghetti code which is difficult to follow. I made a point to think about this in different terms this weekend though, and here&#8217;s how I went about it.</p>
<p>I asked some simple questions, instead of trying to establish an algorithm in pseudo code.</p>
<p><strong>Q: What is a server?</strong></p>
<p>A: A server runs AI and sends out messages to the clients who are interested.</p>
<p><strong>Q: How can I reliably determine which client will be the server in a way that all other clients can agree with? (DONE)</strong></p>
<p>A: This was a tougher question but ended up having an easier answer than I thought it would. There may be hidden issues but overall the basic precept works. Each client is given (by the Shiva Server) a numeric UserID which is unique. The server increments UserIDs as it runs. So the lowest UserID can be the server. When we get a notification that the previous user who was acting as the server has gone away, we can pick the next lowest UserID to be the server. If it happens to be me, I can immediately begin acting like a server.</p>
<p><strong>Q: How can the new server pick up where the previous one left off? (DONE)</strong></p>
<p>A: This is also tricky, but the basics are conceptually simple. When a server creates a new object that it will control, it sends out a message to all the other clients to create that object. When that happens, the clients tuck a reference to that object into a special table in the Server AI module, as does the real server. When the remote objects are deleted, that is also maintained. In the event that I am made the server, I already have a complete list of all the objects which must be maintained. An additional optimization here would be to know when the server last performed processing on its objects, so that the new server can pick up at about the same interval instead of too quickly.</p>
<p><strong>Q: So how does the server process the objects in a way which doesn&#8217;t bog it down? (PARTIAL)</strong></p>
<p>A: This is only a partial answer for now, but it works in initial tests. The server has a single routine which it runs through all its objects and processes them. This routine can be scheduled with a postEvent, or I can run it in a State Loop and examine a time differential in which to perform an update. Right now it is a postEvent.  The objects might have different AI or no AI but need to make certain checks. I&#8217;ll need to come up with a way to send the object a message which tells it to run one &#8216;tick&#8217; of server processing, in which they can pick a new move location, pick a new target, etc.  The objects themselves will be responsible for sending out network updates, but this will probably also be done when the server tells the object to send out the update, so that it doesn&#8217;t overbear the client acting as the server.</p>
<p><strong>The test</strong></p>
<p>My initial test was to just verify the changing and transferring of the server as clients joined/dropped. I was pleased to see it happened pretty much instantly, and a notification shows up in chat that we are the new server, or that such and such user has become the server. From there, I worked in creating a remote object (a blue cube). The server runs its processing routine and simply moves the cube by brute force. On the other end, the cube is created but doesn&#8217;t move yet (it&#8217;s not networked after creation yet). When the original server drops off, the new server immediately begins moving the cube, and so on.</p>
<p>Next steps are to determine the cleanest way to tell objects to perform decisions and send out network updates so their movements and actions can propagate to all players. I&#8217;d like to use the existing AIEntity class to do this, and maybe just turn down the net frequency of the net updates selectively. I am in danger of making that class far too complex though, so I need to be careful. I could use an additional AI on the objects to do this stuff, but it feels messy.</p>
<p>One other additional improvement which is necessary now is to work in the client prediction based on previous velocity for objects. I&#8217;d thought I would need it and was avoiding it, but if I turn down network frequency on the server objects, the clients are definitely going to need to be able to predict movements in the absence of new move instructions.</p>
<p>Anyway, one by one I am tackling these things which have been holding me back, and this one is a doozy! So far so good, I&#8217;m one more step closer to a sensible large scale online game framework (I avoided the term &#8216;MMO&#8217; there hehe)</p>
<p>When the process is more stable I will do a new code drop and documentation on it. I still haven&#8217;t begun to add too many game specific changes, except for a largish change in the move control and camera.</p>
]]></content:encoded>
			<wfw:commentRss>http://daveyounggames.com/?feed=rss2&#038;p=459</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Team Building Exercise&#8221;</title>
		<link>http://daveyounggames.com/?p=445</link>
		<comments>http://daveyounggames.com/?p=445#comments</comments>
		<pubDate>Fri, 18 Feb 2011 20:53:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://daveyounggames.com/?p=445</guid>
		<description><![CDATA[Recently for my engineering team here at Gamesville, I did a team building exercise which was kind of like a cross between simple D&#38;D and Left for Dead. It was a lot of fun. On the ride in that morning there was a lot of traffic so I recorded various sound loops to play at <a href='http://daveyounggames.com/?p=445'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Recently for my engineering team here at Gamesville, I did a team building exercise which was kind of like a cross between simple D&amp;D and Left for Dead. It was a lot of fun. On the ride in that morning there was a lot of traffic so I recorded various sound loops to play at certain times in the game.</p>
<p>Here they are, for your enjoyment, or dismay!</p>
<p><a href="http://daveyounggames.com/wp-content/uploads/2011/02/Zombie300.zip">Zombie300</a></p>
]]></content:encoded>
			<wfw:commentRss>http://daveyounggames.com/?feed=rss2&#038;p=445</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RPG Kit: Multiplayer Network Improvements</title>
		<link>http://daveyounggames.com/?p=420</link>
		<comments>http://daveyounggames.com/?p=420#comments</comments>
		<pubDate>Fri, 18 Feb 2011 07:23:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RPGKit]]></category>
		<category><![CDATA[iPhone Game Development]]></category>
		<category><![CDATA[iPhone MMO]]></category>

		<guid isPermaLink="false">http://daveyounggames.com/?p=420</guid>
		<description><![CDATA[License to Use: You can use the code and tutorials presented within freely for your own projects. If you use anything here, I&#8217;d appreciate a credit, and also appreciate it if you drop me a line to let me know! Networking Breakthrough! (Updated project file at the bottom) Tonight saw an amazing new breakthrough in <a href='http://daveyounggames.com/?p=420'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><strong>License to Use: You can use the code and tutorials presented within freely for your own projects. If you use anything here, I&#8217;d appreciate a credit, and also appreciate it if you drop me a line to let me know!</strong></p>
<p><strong>Networking Breakthrough!</strong></p>
<p>(Updated project file at the bottom)</p>
<p>Tonight saw an amazing new breakthrough in my network technology. I still can&#8217;t believe I stumbled on this. My commute is about 2 hours each way when traffic is &#8216;normal&#8217;, and I&#8217;ve taken to thinking up ways to add various network optimizations. I do think I had something decent to begin with, and indeed I was very excited about it, but it definitely had lag problems and skipping from a jittery Internet.  The only good way to increase the smoothness was to turn up the fidelity.</p>
<p>This solution came upon me after I had explored many various permutations of network optimization. I was experimenting with ping delay, frame time, scheduling moves into the future, packet ordering, with nothing helping the lag except for some error correction. The packet ordering worked OK actually. I also experimented with various different combinations of SnapShots per second, and network updates per second.</p>
<p>This other solution which I keep mentioning was not difficult to code, and some obvious optimizations showed up for it too.</p>
<p><strong>The simple solution</strong></p>
<p>Instead of scheduling moves into the future (and overlapping them wildly), instead I stored them in a table (analogous to a list/queue) in Shiva. Then, at a regular polling interval, I read the first move from the table and delete it. I do this at the same interval that the move snapshots are captured at, roughly. If the moves in the table get to be too long, I increase the polling interval. If the move table is *really* long (&gt;30 moves which would mean 3 seconds&#8217; worth), I crank up the polling speed dramatically. This accounts for lag spikes.</p>
<p>I begin the polling as soon as we are given a network user ID. Check the Video</p>
<p><a href="http://www.youtube.com/watch?v=NMYB5XoEzUE"><span class="youtube">
<object width="640" height="403">
<param name="movie" value="http://www.youtube.com/v/NMYB5XoEzUE?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/NMYB5XoEzUE?color1=d6d6d6&amp;color2=f0f0f0&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="403"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=NMYB5XoEzUE&fmt=18">www.youtube.com/watch?v=NMYB5XoEzUE</a></p></a></p>
<p>The first change is in RemoteObjectAI.unpackMessage:</p>
<pre> if(nMessageType==1) then
        --this.unpackMove ()
        --We used to unpack the move, but now we are just collecting it in a table
        local t = this.tMoveTable ( )
        table.add ( t, sMessage)
        return
    end</pre>
<p>You will also need to modify your original move packet, no need to send out the timestamp difference anymore (saves some space too)</p>
<p>Here&#8217;s the &#8216;magic&#8217; function!</p>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;">function RemoteObjectAI.onGetNextMove (  )</span></p>
<pre>
<div id="_mcePaste">--------------------------------------------------------------------------------</div>
<div id="_mcePaste">--Check the move table for existing moves. If more than one exists, we</div>
<div id="_mcePaste">--grab the top value, turn it into the current target position, and delete it</div>
<div id="_mcePaste">--This happens 10 times a second for a very smooth effect</div>
<div id="_mcePaste">local tMoves = this.tMoveTable ( )</div>
<div id="_mcePaste">local nNumMoves = table.getSize ( tMoves )</div>
<div id="_mcePaste">--log.message ( nNumMoves )</div>
<div id="_mcePaste">--No new moves, just schedule the next call into the future</div>
<div id="_mcePaste">--Also means we're not moving, so turn the speed down to 0</div>
<div id="_mcePaste">if(nNumMoves ==0) then</div>
<div id="_mcePaste">this.nCurrentSpeed ( 0)</div>
<div id="_mcePaste">if(this.hAvatar ( ))    then</div>
<div id="_mcePaste">object.setAIVariable ( this.hAvatar ( ), "AIEntity","nCurrentSpeed",this.nCurrentSpeed ( ))</div>
<div id="_mcePaste">end</div>
<div id="_mcePaste">this.postEvent ( this.nMovePollingInterval ( ),"onGetNextMove" )</div>
<div id="_mcePaste">return</div>
<div id="_mcePaste">end</div>
<div id="_mcePaste">--normal polling interval, at 10 times a second, should be the same rate they were captured at</div>
<div id="_mcePaste">if(nNumMoves &lt; 10) then</div>
<div id="_mcePaste">--log.message ( "Setting polling to 0.1" )</div>
<div id="_mcePaste">this.nMovePollingInterval ( 0.1)</div>
<div id="_mcePaste">end</div>
<div id="_mcePaste">--Check to see if we're stockpiling too many. If so, speed up on grabbing them</div>
<div id="_mcePaste">if(nNumMoves &gt; 15) then</div>
<div id="_mcePaste">log.message ( "Increasing polling to 0.075" )</div>
<div id="_mcePaste">this.nMovePollingInterval ( 0.05)</div>
<div id="_mcePaste">end</div>
<div id="_mcePaste">--If it's really long, speed up the polling interval</div>
<div id="_mcePaste">if(nNumMoves &gt; 30) then</div>
<div id="_mcePaste">log.message ( "Increasing polling to 0.05" )</div>
<div id="_mcePaste">this.nMovePollingInterval ( 0.033)</div>
<div id="_mcePaste">end</div>
<div id="_mcePaste">--Explode the top move from the move table into the 'Message' table so we can get at it's data</div>
<div id="_mcePaste">local tMoveInfo = this.tMessage ( )</div>
<div id="_mcePaste">table.empty ( tMoveInfo )</div>
<div id="_mcePaste">local sMoveInfo = table.getFirst ( tMoves )</div>
<div id="_mcePaste">table.removeFirst ( tMoves )</div>
<div id="_mcePaste">--Turn this into a nice neat table</div>
<div id="_mcePaste">string.explode(sMoveInfo,tMoveInfo,";")</div>
<div id="_mcePaste">local stringtoNumber = string.toNumber</div>
<div id="_mcePaste">local tablegetAt = table.getAt</div>
<div id="_mcePaste">--Should be 1, which is a move event</div>
<div id="_mcePaste">--local nEventType = stringtoNumber(tablegetAt(tCurrentMessage,0))</div>
<div id="_mcePaste">local x = stringtoNumber(tablegetAt(tMoveInfo,1))</div>
<div id="_mcePaste">local y = stringtoNumber(tablegetAt(tMoveInfo,2))</div>
<div id="_mcePaste">local z = stringtoNumber(tablegetAt(tMoveInfo,3))</div>
<div id="_mcePaste">local ry = stringtoNumber(tablegetAt(tMoveInfo,4))</div>
<div id="_mcePaste">local nSpeed = stringtoNumber(tablegetAt(tMoveInfo,5))</div>
<div id="_mcePaste">--Update the new target coordinates</div>
<div id="_mcePaste">this.nTargetX (x )</div>
<div id="_mcePaste">this.nTargetY ( y)</div>
<div id="_mcePaste">this.nTargetZ ( z)</div>
<div id="_mcePaste">this.nTargetRY ( ry)</div>
<div id="_mcePaste">--Original Method</div>
<div id="_mcePaste">--this.nTimeStep ( 1/this.nFrameCounter ( ))</div>
<div id="_mcePaste">--FPS Comparison Method</div>
<div id="_mcePaste">--Figure out how many frames on average we need to interpolate over</div>
<div id="_mcePaste">--nDiff is the total time between move packets. Find a value to interpolate</div>
<div id="_mcePaste">local nLastTime = application.getTotalFrameTime ( )</div>
<div id="_mcePaste">local nDiff =  nLastTime - this.nLastMovePacket ( )</div>
<div id="_mcePaste">this.nLastMovePacket (nLastTime)</div>
<div id="_mcePaste">local nMyFrameTime = application.getLastFrameTime ( )</div>
<div id="_mcePaste">local nNumFrames = nDiff / nMyFrameTime</div>
<div id="_mcePaste">this.nTimeStep ( 1/nNumFrames)</div>
<div id="_mcePaste">--Figure out how many frames on average we need to interpolate over</div>
<div id="_mcePaste">this.nTimeStep ( 1/this.nFrameCounter ( ))</div>
<div id="_mcePaste">this.nFrameCounter ( 0)</div>
<div id="_mcePaste">this.nMoveFactor ( 0)</div>
<div id="_mcePaste">--Speed change? If so, tell our attached avatar how fast we're travelling</div>
<div id="_mcePaste">if(nSpeed ~= this.nCurrentSpeed ( )) then</div>
<div id="_mcePaste">if(this.hAvatar ( ))    then</div>
<div id="_mcePaste">object.setAIVariable ( this.hAvatar ( ), "AIEntity","nCurrentSpeed",this.nCurrentSpeed ( ))</div>
<div id="_mcePaste">end</div>
<div id="_mcePaste">end</div>
<div id="_mcePaste">this.nCurrentSpeed ( nSpeed)</div>
<div id="_mcePaste">this.postEvent ( this.nMovePollingInterval ( ),"onGetNextMove" )</div>
<div id="_mcePaste">--------------------------------------------------------------------------------</div>
<div id="_mcePaste">end</div>
</pre>
<pre>And here is the updated project file. If you come up with improvements, please share!</pre>
<pre><strong>Full Project Archive: <a href="http://daveyounggames.com/wp-content/uploads/2011/02/RPGDemo-NetworkBoost-20110118.zip">RPGDemo-NetworkBoost-20110118</a></strong></pre>
]]></content:encoded>
			<wfw:commentRss>http://daveyounggames.com/?feed=rss2&#038;p=420</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

