<?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>Game Geek Speak &#187; Programming</title>
	<atom:link href="http://geekspeak.creatrixgames.com/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://geekspeak.creatrixgames.com</link>
	<description>Flash, Java, and Unity game development blog with a focus on business and marketing.</description>
	<lastBuildDate>Thu, 29 Jul 2010 01:00:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Java or Flash for game programming: which one?</title>
		<link>http://geekspeak.creatrixgames.com/java-or-flash-for-game-programming-which-one.html</link>
		<comments>http://geekspeak.creatrixgames.com/java-or-flash-for-game-programming-which-one.html#comments</comments>
		<pubDate>Mon, 26 Apr 2010 13:00:25 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=84</guid>
		<description><![CDATA[This question comes up a lot. No, a lot! The problem is, it&#8217;s not important. Not important?! you exclaim. Then why do people ask it all the time? Ok, actually this is a variation on another question: &#8220;What programming language should I use to make my game?&#8221; Once you&#8217;ve made some games, you come to [...]]]></description>
			<content:encoded><![CDATA[<p>This question comes up a lot.</p>
<p>No, <em>a lot!</em></p>
<p>The problem is, it&#8217;s not important.</p>
<p><em>Not important?!</em> you exclaim. Then <em>why do people ask it all the time?</em></p>
<p>Ok, actually this is a variation on another question: &#8220;What programming language should I use to make my game?&#8221; Once you&#8217;ve made some games, you come to know that <strong>it doesn&#8217;t matter</strong>. Any language will do. What does matter is the end product! Is it fun? Does it run on enough machines to meet your goals? Does it do what you wanted it to do? That&#8217;s all that matters.</p>
<p>Technology is a tool, so <strong>use whatever language you&#8217;d like</strong>.</p>
<p>As true as that is, it&#8217;s not always true.</p>
<p>The one way that choosing a language does matter is in the context of what you want to accomplish. Is your game downloadable? Or is it meant to be played in a browser? Those are big considerations, and they will have a material effect on what language (and tool set) you choose.</p>
<p>Narrowing things to Flash versus Java (where I have the most experience if you don&#8217;t count 10 years of C++), though, the answer is still, &#8220;It depends.&#8221;</p>
<p>Java and Flash both do downloadable and browser deployment, so let&#8217;s assume those factors are equal and are, thus, non-factors.</p>
<p>Do you want to reach the broadest audience or are you more interested in fast rendering and processing?</p>
<p>We all want fast rendering, but I mean does your project <em>need</em> lots of rendering muscle to succeed? Not just, &#8220;Oh it looks so cool.&#8221; but &#8220;Oh, this is not playable!&#8221; It&#8217;s got to <em>really</em> matter to the end product (because, ultimately, <em>the end product</em> is all that matters).</p>
<p>Java can render using hardware and is way faster than ActionScript, so it will have more power than Flash. A great browser library for Java is <a href="http://www.interactivepulp.com/pulpcore/">PulpCore</a>. The feel of Flash with the speed of Java (although, it doesn&#8217;t do hardware rendering that I know of&#8211;but it is very close to a Flash experience without Flash, if that suits your persuasion).</p>
<p>Flash will ensure that your users have a more hassle-free experience since it&#8217;s installed on 99% of computers, whereas Java has quite a few old versions that are common. Relying on hardware rendering can give rise to technical incompatibilities, though Java doesn&#8217;t <em>have</em> to use hardware, so that can be mitigated.</p>
<p>Java is getting better about updates and penetration, but Flash still wins when you want to be compatible with the most computers (especially older or quirky hardware). That&#8217;s not to mention Flash is more web-enabled (ie, has strong support for integration with many sites and game portal APIs like Kongregate and Facebook), so for online games it makes lots of sense.</p>
<p>So, again, your answer has to derive from the question of how it affects the end product and what your goals are for it.</p>
<p>I&#8217;m doing online games, so I don&#8217;t want players to have to download and install anything. That&#8217;s a huge concern to me, so Flash wins almost right away because it&#8217;s the most hassle free. My second concern is penetration, and again&#8211;for my goals&#8211;Flash wins. I design for lower quality visuals but it&#8217;s made up for by the fact that I can reach more potential players. For commercial reasons, reaching more players is more important than having the best rendering sizzle.</p>
<p>For my backend (a.k.a. game servers), I use Java. Java is plenty fast, works on the platform I care about (Linux for servers), and was easy to learn with my backlog of C++ experience.</p>
<p>To summarize: <strong>the language you use is only relevant in context of the goals of your end product</strong>.</p>
<p>If you&#8217;re a hobbyist and don&#8217;t have any real goals, pick anything you like. If you have commercial goals, pick something that directly supports those goals.</p>
<p>It&#8217;s very project-specific, and it might even change from one project to the next.</p>
<p>Whatever the case, just make sure you&#8217;re having fun and don&#8217;t get all serious and uptight about languages and tools. It&#8217;s about the <em>games!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://geekspeak.creatrixgames.com/java-or-flash-for-game-programming-which-one.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Angry Explanations #2: Spinning a freaking image with PBE!</title>
		<link>http://geekspeak.creatrixgames.com/angry-explanations-2-spinning-a-freaking-image-with-pbe.html</link>
		<comments>http://geekspeak.creatrixgames.com/angry-explanations-2-spinning-a-freaking-image-with-pbe.html#comments</comments>
		<pubDate>Thu, 19 Nov 2009 17:26:52 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[PushButton Engine]]></category>

		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=506</guid>
		<description><![CDATA[Following on from Angry Explanations #1, we will now add some motion to the scene. For kicks and giggles, we&#8217;ll cause the image to rotate each frame. (Note that this information is in reference to PushButton Engine build r625.) The key takeaway here is that for a component to be tickable, it must implement the [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from <a href="http://geekspeak.creatrixgames.com/angry-explanations-1-how-to-draw-a-freaking-image-with-pbe.html">Angry Explanations #1</a>, we will now add some motion to the scene. For kicks and giggles, we&#8217;ll cause the image to rotate each frame.</p>
<p>(Note that this information is in reference to <a href="http://pushbuttonengine.com">PushButton Engine</a> build r625.)</p>
<p>The key takeaway here is that for a component to be tickable, it must implement the <code>ITickedObject</code> interface and then tell the <code>ProcessManager</code> to start and stop calling <code>onTick()</code> every tick.</p>
<p>Oh, there&#8217;s one other key takeaway here: how to use <code>PropertyReference</code>s. You get a property of a component by way of the owning entity. You create a <code>PropertyReference</code> instance for each data member that you need to access. In this example, we&#8217;re accessing the <code>rotation</code> field on the <code>SpriteRenderer</code> component we added in <a href="http://geekspeak.creatrixgames.com/angry-explanations-1-how-to-draw-a-freaking-image-with-pbe.html">Angry Explanations #1</a>.</p>
<p>In a bit more detail, the <code>PropertyReference</code> is constructed with a special string: <code>"@Sprite.rotation"</code> (see line 11 in the code below). That means, this is a reference to the component of this entity with the name &#8220;Sprite&#8221; (recall that we gave it that name when we created the <code>SpriteRenderer</code> component instance), and the field &#8220;rotation&#8221; of the <code>SpriteRenderer</code> class. It&#8217;s quite simple once you realize what it&#8217;s doing (<em>but I&#8217;m no less angry, mind you!</em>).</p>
<p>I thought that a SpatialComponent might be necessary to alter the sprite&#8217;s position, but apparently that component has been removed (since r470, which is the current packaged release). That data seems to now be handled by the renderer component itself.</p>
<p>Add this one line to the end of <code>showLogo()</code> from the previous example:</p>
<pre class="brush: as3">spriteEntity.addComponent( new SpinController(), &quot;spinner&quot; );</pre>
<p>Then add the following new class in a sub-folder (components/controllers/).</p>
<pre class="brush: as3">
package com.yourcompany.yourgame.components.controllers
{
	import com.pblabs.engine.core.ITickedObject;
	import com.pblabs.engine.core.ProcessManager;
	import com.pblabs.engine.entity.EntityComponent;
	import com.pblabs.engine.entity.PropertyReference;

	public class SpinController extends EntityComponent implements ITickedObject
	{
		// Cache the PropertyReference instance here to avoid a bunch of temporary allocations.
		private var _rotProp:PropertyReference = new PropertyReference( &quot;@Sprite.rotation&quot; );

		// Nothing to do in the constructor because this is such a simple example.
		public function SpinController()
		{
			super();
		}

		// When the component is added to the sprite entity, we want to register to
		// get tick updates by the ProcessManager.
		protected override function onAdd():void
		{
			super.onAdd();

			ProcessManager.instance.addTickedObject( this );
		}

		// When the component is removed from the sprite entity, we want to unregister
		// from the ProcessManager so tick updates will stop.
		protected override function onRemove():void
		{
			super.onRemove();

			ProcessManager.instance.removeTickedObject( this );
		}

		// Each tick, we just change the rotation of the sprite renderer a little bit.
		public function onTick(tickRate:Number):void
		{
			// Get the current rotation.
			var rotation:Number = owner.getProperty( _rotProp ) as Number;

			// Add 1 degree to it.
			rotation += 1;

			// Store the new rotation back in the sprite.
			owner.setProperty( _rotProp, rotation );
		}
	}
}</pre>
<p>As an addendum, I should point out that the rotation will probably not be smooth. To fix that, you should have the <code>SpinController</code> implement <code>IAnimatedObject</code> instead of <code>ITickedObject</code>. The registration with the <code>ProcessManager</code> is the same, except you call <code>addAnimatedObject()</code> instead of <code>addTickedObject()</code>.</p>
<p>The difference is that <code>IAnimatedObject</code> will update when Flash draws a frame instead of when the <code>ProcessManager</code> ticks, and the motion will appear a lot smoother.</p>
<p>And you&#8217;ll want to normalize the rotation based on delta time since the last frame. Er, like this:</p>
<pre class="brush: as3">public function onFrame( elapsed:Number ):void
{
	var rotation:Number = owner.getProperty( _rotProp ) as Number;

	// Rotate 15 degrees per second, nice and slow.
	rotation += 15 * elapsed;

	owner.setProperty( _rotProp, rotation );
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://geekspeak.creatrixgames.com/angry-explanations-2-spinning-a-freaking-image-with-pbe.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Angry Explanations #1: How to draw a freaking image with PBE!</title>
		<link>http://geekspeak.creatrixgames.com/angry-explanations-1-how-to-draw-a-freaking-image-with-pbe.html</link>
		<comments>http://geekspeak.creatrixgames.com/angry-explanations-1-how-to-draw-a-freaking-image-with-pbe.html#comments</comments>
		<pubDate>Wed, 18 Nov 2009 00:24:57 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PushButton Engine]]></category>

		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=466</guid>
		<description><![CDATA[(Thanks to Ben G. for that humorous title! And just to be super clear&#8211;I&#8217;m not angry at all about PBE. The anger is entirely tongue-in-cheek.) So, yeah, I got started with PBE at a bad time, I think. It&#8217;s in transition between some major changes, and so all the docs and tutorials to this point [...]]]></description>
			<content:encoded><![CDATA[<p>(Thanks to Ben G. for that humorous title! <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  And just to be super clear&#8211;I&#8217;m not angry at all about PBE. The anger is entirely tongue-in-cheek.)</p>
<p>So, yeah, I got started with <a href="http://pushbuttonengine.com/">PBE</a> at a bad time, I think.</p>
<p>It&#8217;s in transition between some major changes, and so all the docs and tutorials to this point are out of sync and <del datetime="2009-11-18T00:30:38+00:00">kind of</del> very&#8230; confusing. Because of that, I really struggled to figure this out, and in fact couldn&#8217;t get an image on the screen without professional help (I&#8217;ll let you interpret that however you&#8217;d like).</p>
<p>This information is relevant for PBE r625 and up.</p>
<p>(This isn&#8217;t to say the engine is poorly designed&#8211;it&#8217;s simply not accurately documented in places because it has been changing so quickly. And to be fair, it&#8217;s still in beta. I wouldn&#8217;t use the engine if I didn&#8217;t think it was great.)</p>
<h2>A frustrated noob&#8217;s guide to getting a freakin&#8217; image on the dang screen using Flex 3</h2>
<p>Here&#8217;s the MXML which will reference the code.</p>
<pre class="brush: xml">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;game:Game
	xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
	xmlns:game=&quot;com.yourcompany.yourgame.*&quot;
	width=&quot;750&quot;
	height=&quot;600&quot;
	layout=&quot;absolute&quot;&gt;

&lt;/game:Game&gt;</pre>
<p>Now define a resource in a ResourceBundle subclass, which is the image you want to display, and let PBE automagically make it accessible through the resource manager.</p>
<pre class="brush: as3">package com.yourcompany.yourgame
{
	import com.pblabs.engine.resource.ResourceBundle;

	public class EmbeddedResources extends ResourceBundle
	{
		// The path is magically also the name of the resource.
		[Embed(source=&quot;../assets/images/logo.png&quot;, mimeType=&quot;application/octet-stream&quot;)]
		public var logoImage:Class;
	}
}</pre>
<p>Put that image into action! It&#8217;s a simple notion, but somewhat complicated if you&#8217;re new to the engine and its gooey innards.</p>
<pre class="brush: as3">package com.yourcompany.yourgame
{
	import com.pblabs.engine.PBE;
	import com.pblabs.engine.entity.IEntity;
	import com.pblabs.engine.resource.ImageResource;
	import com.pblabs.engine.resource.ResourceManager;
	import com.pblabs.rendering2D.DisplayObjectScene;
	import com.pblabs.rendering2D.SpriteRenderer;
	import com.pblabs.rendering2D.ui.FlexSceneView;

	import mx.containers.Canvas;
	import mx.core.Application;
	import mx.events.FlexEvent;

	public class Game extends Application
	{
		public var resources:EmbeddedResources;

		// We need access to this in a couple of functions.
		private var _scene:DisplayObjectScene;

		public function Game()
		{
			super();

			// Let the Flex Application initialize fully before we muck with it.
			addEventListener( FlexEvent.APPLICATION_COMPLETE, onStartup );
		}

		// This is called once the Flex app (stage, in particular) is initialized.
		private function onStartup( e:FlexEvent ) : void
		{
			// Load our embedded resources (the image to show).
			resources = new EmbeddedResources();

			// Tell PBE to initialize and pass it our instance so it can get the stage.
			// (Remember, Application is a subclass of Sprite, which PBE needs.)
			PBE.startup( this );

			createPbeScene();

			showLogo();
		}

		private function createPbeScene():void
		{
			// Create a new IEntity for the scene view.
			var sceneEntity:IEntity = PBE.allocateEntity();
			sceneEntity.initialize( &quot;sceneEntity&quot; );

			_scene = new DisplayObjectScene();

			// Since this is Flex, we need the appropriate scene view class.
			var sceneView:FlexSceneView = new FlexSceneView();

			// Set up the view size.
			sceneView.width = 750;
			sceneView.height = 600;

			// FREAKIN&#039; IMPORTANT: add the view as a child to our display list!
			this.addChild( sceneView );

			// Connect the view to the display object scene (a component).
			_scene.sceneView = sceneView;

			// Add the display object scene to the scene entity.
			sceneEntity.addComponent( _scene, &quot;renderer&quot; );
		}

		private function showLogo():void
		{
			// Create a new IEntity instance for the sprite to be displayed.
			var spriteEntity:IEntity = PBE.allocateEntity();
			spriteEntity.initialize( &quot;logoEntity&quot; );

			// Add a sprite rendering component.
			var sprite:SpriteRenderer = new SpriteRenderer();

			// Tell the renderer to draw (and load) this image resource.
			sprite.fileName = &quot;../assets/images/logo.png&quot;;

			// Tell the renderer to draw to the display object scene.
			sprite.scene = _scene;

			// Add the component to the sprite entity.
			spriteEntity.addComponent( sprite, &quot;sprite&quot; );
		}
	}
}
</pre>
<p>So, what the heck just happened? Pfft! Don&#8217;t ask me! <em>I&#8217;m still a freakin&#8217; noob!</em> <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I know a couple of things, though. The SceneView is like a &#8220;canvas&#8221; where all DisplayObjectRenderers are drawn. So you create entities and fill them with components (like a SpriteRenderer) and tell the renderer component about the scene view. Magically, the sprite appears! It&#8217;s not too much to understand if you just want to know the API and how to use it.</p>
<p>To really understand it, you&#8217;ll need to look under the hood and figure out the connections. A good bit of hidden work is being done to simplify the API, but possibly at the expense of understanding. It&#8217;s neither good nor bad. It&#8217;s just The Way of PBE (for now).</p>
<p>Feel free to post here to help fill my gaps in comprehension. I haven&#8217;t used the engine enough to write a thorough explanation, and I&#8217;m not too proud to accept help. <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://geekspeak.creatrixgames.com/angry-explanations-1-how-to-draw-a-freaking-image-with-pbe.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Virtual item sales in Flash: a managed payment service roundup</title>
		<link>http://geekspeak.creatrixgames.com/virtual-item-sales-in-flash-a-managed-payment-service-roundup.html</link>
		<comments>http://geekspeak.creatrixgames.com/virtual-item-sales-in-flash-a-managed-payment-service-roundup.html#comments</comments>
		<pubDate>Fri, 04 Sep 2009 18:15:07 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Monetization]]></category>
		<category><![CDATA[Virtual Goods]]></category>

		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=346</guid>
		<description><![CDATA[The microtransaction bug seems to be going viral these days among the Flash community. There are a growing number of companies offering managed payment services to Flash developers: they handle the dirty backside, and you give them content and share the income. I personally think that it is worth it to build your own system [...]]]></description>
			<content:encoded><![CDATA[<p>The microtransaction bug seems to be going viral these days among the Flash community. There are a growing number of companies offering managed payment services to Flash developers: they handle the dirty backside, and you give them content and share the income.</p>
<p>I personally think that it is worth it to build your own system (and I&#8217;m usually the guy saying, &#8220;Use the middleware, fool!&#8221;). But I think it depends on the scale of what you are planning. In my case, I want total control, and I want to own access to my customers so that I can continue to communicate with them. I also don&#8217;t want my games to become advertisements for a payment service.</p>
<p>I don&#8217;t view virtual item sales as just a sales channel. It&#8217;s also a gesture that means a player cares about and is emotionally invested in the game, and I want to maximize that relationship to make my players happy, long-term customers. Without access to my customers, the payment service is crippling my business. I don&#8217;t know that all these systems insulate the developer from his/her customers, but that is a major issue to bear in mind.</p>
<p>These Flash-specific services could be really useful to someone who is making much smaller scale games and wants some add-on sales or someone experimenting with virtual goods in an effort to diminish reliance on ad revenue. I&#8217;m not reviewing any of the services, just announcing that they exist. I haven&#8217;t investigated them all very deeply, but I will be poking around.</p>
<p>75% &#8211; <a href="http://andrograde.com/api.php">andrograde.com</a><br />
70% &#8211; <a href="http://www.nonoba.com/developers/payment/overview">www.nonoba.com</a><br />
60% &#8211; <a href="http://www.gamersafe.com/">www.gamersafe.com</a><br />
60% &#8211; <a href="http://www.mochimedia.com/developers/coins.html">www.mochimedia.com</a><br />
50% &#8211; <a href="http://www.heyzap.com/developers">www.heyzap.com</a></p>
<p>Which is best? It depends on your goals and plans. If you&#8217;re just making little quickie games (90% of Flash games), then any of the above would work. If you have a more broadly scoped business plan, you might want to steer clear and look into services that are not Flash-specific and spend the time/money to do the integration yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekspeak.creatrixgames.com/virtual-item-sales-in-flash-a-managed-payment-service-roundup.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When instanceof doesn&#8217;t recognize an instanceof.</title>
		<link>http://geekspeak.creatrixgames.com/when-instanceof-doesnt-recognize-an-instanceof.html</link>
		<comments>http://geekspeak.creatrixgames.com/when-instanceof-doesnt-recognize-an-instanceof.html#comments</comments>
		<pubDate>Fri, 14 Aug 2009 00:32:30 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=399</guid>
		<description><![CDATA[Java&#8217;s &#8216;instanceof&#8217; keyword is not the same as ActionScript&#8217;s &#8216;is&#8217; keyword. In theory, they do the same thing: find out if an instance of an object implements a class or interface. In reality, they&#8217;re quite different. Java compares for an exact match. ActionScript compares for a match or any subclass of the class being compared. [...]]]></description>
			<content:encoded><![CDATA[<p>Java&#8217;s &#8216;instanceof&#8217; keyword is not the same as ActionScript&#8217;s &#8216;is&#8217; keyword. In theory, they do the same thing: find out if an instance of an object implements a class or interface. In reality, they&#8217;re quite different.</p>
<p>Java compares for an exact match. ActionScript compares for a match or any subclass of the class being compared.</p>
<p>Let&#8217;s say we have class A which implements interface I. And we have class B which is a subclass of A (and implicitly implements interface I).</p>
<p>Java:</p>
<pre>
if( A instanceof I ) // True
    print( "yeah" );

if( B instanceof A ) // True
    print( "yeah" );

if( B instanceof I ) // False!
    print( "yeah" );
</pre>
<p>ActionScript:</p>
<pre>
if( A is I ) // True
    print( "yeah" );

if( B is A ) // True
    print( "yeah" );

if( B is I ) // True!
    print( "yeah" );
</pre>
<p>So, having learned a lot of ActionScript before diving into Java, I expected &#8216;instanceof&#8217; to behave just like &#8216;is&#8217;. But no. And that was annoying not to realize at first. So, you&#8217;ve been warned!!</p>
<p><i>Update:</i> Hmm, now I wonder if overloading method parameters behaves the same way as instanceof in Java? I&#8217;m going to be safe and make an interface for any classes that have multiple subclasses (ie, categories of entities which require special behaviors). It&#8217;s still polymorphic, so I guess it&#8217;s &#8220;good design.&#8221; I haven&#8217;t had quite enough experience digging into the reasons for Java&#8217;s language design choices.</p>
<p><i>Update 2:</i> Of course I had to test the behavior of overloaded methods. Turns out that Java isn&#8217;t as exacting with overloaded methods&#8211;which is a relief!</p>
<p>For example, I have an Entity class, and a subclass called ItemEntity. I need to do some special handling on an ItemEntity (or any subclass of it) in a method that takes Entity as a parameter. Overloading that method to take an ItemEntity gives me the desired behavior for ItemEntity or any subclass of ItemEntity. Yay!</p>
]]></content:encoded>
			<wfw:commentRss>http://geekspeak.creatrixgames.com/when-instanceof-doesnt-recognize-an-instanceof.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>When ActionScript talks to Java using bytes</title>
		<link>http://geekspeak.creatrixgames.com/when-actionscript-talks-to-java-using-bytes.html</link>
		<comments>http://geekspeak.creatrixgames.com/when-actionscript-talks-to-java-using-bytes.html#comments</comments>
		<pubDate>Sat, 08 Aug 2009 22:26:13 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Project Darkstar]]></category>

		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=386</guid>
		<description><![CDATA[I&#8217;ve just finished building my client/server communication loop for Spirits of Gaia. The client is Flash (Flex), and the server is Java (built on Project Darkstar). Darkstar uses a binary message format, which is a different approach from something like SmartFox, which uses strings (&#8220;raw&#8221;, XML, or JSON). I had experience with SmartFox, but I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just finished building my client/server communication loop for Spirits of Gaia. The client is Flash (Flex), and the server is Java (built on Project Darkstar).</p>
<p>Darkstar uses a binary message format, which is a different approach from something like SmartFox, which uses strings (&#8220;raw&#8221;, XML, or JSON). I had experience with SmartFox, but I hadn&#8217;t tried to implement a binary format in Flash before. It really wasn&#8217;t bad in the end, and most of my time was spent just learning about ByteBuffers and ByteArrays in ridiculous amounts of detail.</p>
<p>And&#8211;of course&#8211;one of my bugs probably induced more research than necessary as I attributed malfunctions to various other possible causes. The bug was that I inherited one of the command processing classes from a base class which didn&#8217;t implement what I thought it did, so it was silently failing. <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_rolleyes.gif' alt=':roll:' class='wp-smiley' />  But I learned a lot. A <i>whole fricken lot!</i> And that&#8217;s enough learning for anybody.</p>
<p>So one issue is that you can&#8217;t be sure what the endian-ness is for the server or the client. Well, maybe you can, but before now I didn&#8217;t know enough about it to make any assumptions. Darkstar uses ByteBuffers to hold incoming messages, and the default for Java is big endian for ByteBuffer. Thus, I use big endian on the server.</p>
<p>I had a feeling that Flash would take care of it for me, but of course I wanted to make sure it was using big endian, too. For a while, though, I didn&#8217;t know how to make a ByteArray use big endian or little endian.</p>
<p><img src="http://geekspeak.creatrixgames.com/wp-content/uploads/2009/08/hexadecimal.png" alt="hexadecimal" title="hexadecimal" width="200" height="218" class="alignright size-full wp-image-395" /> My first approach was to get around it entirely by encoding all values that require more than 1 byte into hex strings. What a joyful aside that was! (Sarcasm, you see.) I mean, now I know how to encode anything to hex and back and do it sideways, too. But, this wasn&#8217;t working so well and it was bloating the nice binary format anyway. (No, I wasn&#8217;t really concerned about the size of the packets based on that, but if there&#8217;s a better way <i>and</i> it&#8217;s more space efficient&#8211;why not?)</p>
<p>Then I dug a bit deeper and realized that you can tell a ByteArray to use big endian like this:</p>
<pre>
var buffer:ByteArray = new ByteArray();
buffer.endian = Endian.BIG_ENDIAN;
</pre>
<p>Hard, huh? <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So then I didn&#8217;t need to encode multi-byte values into fun hex strings anymore (with one exception). So my PacketBuffer class got a bit more efficient in speed and size, and all is well now.</p>
<p>The one exception is for Java long values, which are 8 bytes. Flash (as far as I know) has no way to pull an 8-byte value from a ByteArray. And, no, I don&#8217;t want to do it by hand&#8211;which doesn&#8217;t mean I won&#8217;t! If encoding to hex string doesn&#8217;t work out, then I&#8217;ll write some code to stitch 8 bytes into a long value and stuff that into a Number (since it won&#8217;t fit into a 4-byte int). But, honestly, that kind of stuff is not my cup of tea because it&#8217;s not fun to me. But if it&#8217;s gotta be done, I&#8217;m a professional, so I&#8217;ll buckle down and do it. Clearly, I want to whine about it <i>a lot</i> just in case I do really need to do it.</p>
<p>For completeness, you tell a Java ByteBuffer to use big endian like this:</p>
<pre>
final ByteBuffer buffer = ByteBuffer.allocate( someSize );
buffer.order( ByteOrder.BIG_ENDIAN );
</pre>
<p>I think it&#8217;s ok to assume that Java (and Darkstar) will still default to big endian on whatever OS my future game server will be running (a flavor of Linux, no doubt). If I run into some bizarre bug where command ids are getting scrambled, I&#8217;ll know the first place to look.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekspeak.creatrixgames.com/when-actionscript-talks-to-java-using-bytes.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Learning resources for Darkstar newbies</title>
		<link>http://geekspeak.creatrixgames.com/learning-resources-for-darkstar-newbies.html</link>
		<comments>http://geekspeak.creatrixgames.com/learning-resources-for-darkstar-newbies.html#comments</comments>
		<pubDate>Fri, 05 Jun 2009 19:05:14 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Project Darkstar]]></category>

		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=290</guid>
		<description><![CDATA[I&#8217;ve been intensely researching Project Darkstar Server (PDS). Along the way, I thought I would collect some of the documentation, forum posts, and tutorials that have helped me understand how to get started. I&#8217;ve tried to avoid outdated stuff and only post things relevant to the latest Darkstar (0.9.9 0.9.10 0.9.11). Over time, I will [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been intensely researching Project Darkstar Server (PDS). Along the way, I thought I would collect some of the documentation, forum posts, and tutorials that have helped me understand how to get started. I&#8217;ve tried to avoid outdated stuff and only post things relevant to the latest Darkstar (<del datetime="2009-07-13T16:12:47+00:00">0.9.9</del> <del datetime="2009-11-07T16:29:20+00:00">0.9.10</del> 0.9.11). Over time, I will add more as my own knowledge and experience deepens.</p>
<p>So, I present to you <i>A collection of valuable links and resources for finding your way through the Darkstar code thicket.</i></p>
<h3>Getting Started</h3>
<p>You&#8217;ll need to <a href="http://java.sun.com/javase/">understand this</a> before you even get started.</p>
<ul>
<li><a href="http://www.projectdarkstar.com/faq.html">FAQ</a></li>
<li><a href="http://www.projectdarkstar.com/components/com_mambowiki/images/a/a9/Javaone_darkstar2009.pdf">Darkstar overview</a> (PDF)</li>
<li><a href="http://www.projectdarkstar.com/components/com_mambowiki/images/c/cc/OH2008aPoster.pdf">Architecture diagram</a> (PDF)</li>
<li><a href="http://www.projectdarkstar.com/components/com_mambowiki/images/2/29/Coding_project_darkstar_games.pdf"><i>Coding Darkstar Games</i> presentation slides</a> (PDF)</li>
<li><a href="http://www.projectdarkstar.com/external/projects.html">Some projects built on Darkstar</a> (clients, tools, etc.)</li>
</ul>
<h4>Server</h4>
<ul>
<li>Official <a href="http://www.projectdarkstar.com/distributions/current/sgs-server/tutorial/ServerAppTutorial.pdf">server tutorial</a> (PDF)</li>
<li><a href="http://www.projectdarkstar.com/distributions/current/sgs-server/doc/">Server API documentation</a></li>
<li><a href="http://blogs.sun.com/stp/entry/authentication_or_the_gaps_where">Authentication protocol</a></li>
<li><a href="http://www.projectdarkstar.com/forum/?topic=702.0">Darkstar compared to Electroserver/SmartFox Server</a></li>
</ul>
<h4>Example Clients</h4>
<ul>
<li><a href="http://www.projectdarkstar.com/distributions/current/sgs-client/tutorial/ClientTutorial.pdf">Official (Java) client tutorial</a> (PDF)</li>
<li><a href="http://www.projectdarkstar.com/components/com_mambowiki/images/c/c4/Darkstar-as3-jw-GDC09.pdf">A Flash client implementation</a> (PDF)</li>
</ul>
<h3>Darkstar Basics</h3>
<ul>
<li>The mighty Seth and Owen wrote a framework called <a href="http://www.projectdarkstar.com/forum/?topic=1316.0">Slipstream</a> and an accompanying <a href="https://slipstream.dev.java.net/source/browse/slipstream/trunk/doc/slipstream.pdf?rev=49">document</a> (PDF) which is invaluable for learning.</li>
<li>Configuring <a href="http://www.projectdarkstar.com/forum/?topic=1025.0">logging output</a> and more about <a href="http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html">Java logging</a></li>
<li><a href="https://darkmud-redux.dev.java.net/alm-process/1-Tutorial/documents/UnderstandingDarkMud01.html">Understanding the communications model</a> (client/server direct and channels)</li>
<li><a href="http://www.projectdarkstar.com/forum/?topic=998.0">Channels, sessions, listeners</a></li>
<li>JavaOne 2008 <a href="http://developers.sun.com/learning/javaoneonline/j1lab.jsp?lab=LAB-7400LT&#038;yr=2008&#038;track=1">MUD tutorial</a> (useful, if somewhat dated)</li>
<li>JavaOne 2009 <a href="http://projectdarkstar.com/handsonlab/intro.html">Project Snowman tutorial</a>, which is a 3d multiplayer game. Very useful! It&#8217;s been said that this game was <a href="http://www.projectdarkstar.com/forum/?topic=683.msg4567">handling 3000 clients</a> on a single server node.</li>
<li><a href="http://www.projectdarkstar.com/forum/?topic=883.0">To partition the world, or not?</a></li>
<li><a href="http://www.projectdarkstar.com/forum/?topic=945.0">Server side physics, or not?</a> Or something in between?</li>
<li><a href="http://www.projectdarkstar.com/forum/?topic=435.msg2705">Discussion on how clients talk to each other and the server</a>. Interesting thoughts about latency hiding if you haven&#8217;t been exposed to the kinds of issues multiplayer programming presents.</li>
<li>An insightful discussion which reveals a lot about <a href="http://www.projectdarkstar.com/forum/?topic=1299.0">Darkstar performance tuning and profiling</a>.</li>
</ul>
<h3>Understanding Managed Objects</h3>
<ul>
<li><a href="http://www.projectdarkstar.com/forum/?topic=897.0">Serializable properties of managed objects</a> (MOs)</li>
<li><a href="http://www.projectdarkstar.com/forum/?topic=51.0">Static data in a multi-VM environment</a> and <a href="http://www.projectdarkstar.com/forum/?topic=1092.0">when it might be ok to use static data</a> (and a bit quicker to the point than the first previous link).</li>
<li><a href="http://blogs.sun.com/stp/date/20080924">When/why managed tasks</a></li>
<li>Managed objects in relation to <a href="http://www.projectdarkstar.com/forum/?topic=79.msg2536#msg2536">storing persistent player data</a></li>
<li><a href="http://www.projectdarkstar.com/forum/?topic=586.0">World representation and data transfer</a></li>
</ul>
<h3>Understanding Tasks</h3>
<ul>
<li><a href="http://www.projectdarkstar.com/forum/?topic=940.0">Task and scheduling tasks</a></li>
<li><a href="http://blogs.sun.com/stp/date/20080924">When/why managed tasks</a> (repeated since it&#8217;s relevant to MOs and Tasks)</li>
<li><a href="http://www.projectdarkstar.com/forum/?topic=60.0">Task-based updates</a> instead of inner loops</li>
<li><a href="http://www.projectdarkstar.com/forum/?topic=774.0">Reactive (event-based) updates</a> instead of polling update loop</li>
<li>More on <a href="http://www.projectdarkstar.com/forum/?topic=920.0">being reactive instead of polling</a></li>
<li>Monitoring task execution and failures <a href="http://www.projectdarkstar.com/forum/?topic=1322.0">using logging output</a></li>
</ul>
<h3>Services and Managers</h3>
<ul>
<li><a href="http://www.projectdarkstar.com/forum/?topic=470.15">RPC under Darkstar</a></li>
<li><a href="http://blogs.sun.com/stp/entry/writing_services">Writing your own service</a></li>
</ul>
<h3>Protocols and Transports</h3>
<ul>
<li>Using the <a href="http://www.projectdarkstar.com/forums/index.php?topic=1217.0">pluggable transport/protocol layer</a> (may assist your initial understanding)</li>
</ul>
<h3>Known Issues (Big Ones)</h3>
<ul>
<li><del datetime="2009-11-07T16:27:05+00:00"><a href="http://www.projectdarkstar.com/forum/?topic=79.0">Time gap when the server shuts down and restarts</a></del> This is resolved in <a href="http://www.projectdarkstar.com/forum/?topic=1302.0">PDS 0.9.11</a>!</li>
<li>Difficulties <a href="http://www.projectdarkstar.com/forum/?topic=134.0">patching a live server</a></li>
<li>More discussion about <a href="http://www.projectdarkstar.com/forum/?topic=333.0">overcoming issues updating live servers</a></li>
</ul>
<h3>Vital Tools</h3>
<ul>
<li>Gamalocus <a href="http://code.google.com/p/darkstar-profiler/">profiler and viewer</a> &#8211; <i>really</i> useful, and the graphical viewer makes interpreting the data much easier. It hasn&#8217;t been updated in a while, so I hope the project owner keeps it up to date or it can be given a new maintainer.</li>
<li><a href="https://darkstar-services.dev.java.net/source/browse/darkstar-services/">Asynchronous task library</a> &#8211; if you need to do anything outside of Darkstar (like access a database), you will probably want to use this to work outside the Darkstar task time limitation. (I wish this was on Google code. The Java.net site is really horrible [and slow for me] by comparison.)</li>
<li><a href="https://mocksgs.dev.java.net/">MockSGS</a> &#8211; a unit testing library for Darkstar.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://geekspeak.creatrixgames.com/learning-resources-for-darkstar-newbies.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Better than SmartFox? Researching Project Darkstar Server.</title>
		<link>http://geekspeak.creatrixgames.com/better-than-smartfox-researching-project-darkstar-server.html</link>
		<comments>http://geekspeak.creatrixgames.com/better-than-smartfox-researching-project-darkstar-server.html#comments</comments>
		<pubDate>Thu, 28 May 2009 19:23:37 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=277</guid>
		<description><![CDATA[I haven&#8217;t reached any conclusions yet, but I am really excited about Project Darkstar Server. Project Darkstar is software infrastructure that aims to simplify the development and operation of massively scalable online games, virtual worlds, and social networking applications. Originally created by Sun Microsystems, it is today advanced as an open source project through the [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t reached any conclusions yet, but I am really excited about <a href="http://www.projectdarkstar.com/">Project Darkstar Server</a>.</p>
<blockquote><p>Project Darkstar is software infrastructure that aims to simplify the development and operation of massively scalable online games, virtual worlds, and social networking applications.  Originally created by Sun Microsystems, it is today advanced as an open source project through the Project Darkstar Community.</p></blockquote>
<p>I knew about it a few years ago, but it didn&#8217;t seem complete enough to bother with. But then I saw that <a href="http://campfu.com/">CampFu</a> had launched using it on their games backend, and that pushed me over the fence into wanting to investigate because it has to be pretty robust and usable to support a commercial product like that.</p>
<p><img src="http://geekspeak.creatrixgames.com/wp-content/uploads/2009/05/campfu.jpg" alt="campfu" title="campfu" width="400" height="271" class="alignright size-full wp-image-280" /> I like <a href="http://www.smartfoxserver.com/">SmartFox Server</a> just fine. I think for my needs (indie games on small to medium scale), it would work really well. But two big motivations for looking at Darkstar are that 1) Darkstar seems like it provides more MMO functionality from the start, and 2) Darkstar is free and open source.</p>
<p>I had written a hefty chunk of server code for SmartFox already, and had plans for more. That&#8217;s really the product&#8217;s weakness for doing something with a persistent world type experience. SmartFox is very bare bones, but that&#8217;s not a bad thing if you go in knowing it&#8217;s not MMO-in-a-box. Well, I don&#8217;t think Darkstar is, either, but it appears to have more than SmartFox that is specifically for virtual worlds. So that is what really excites me about it: maybe I can get to building game logic sooner!</p>
<p>I&#8217;ve only done a day of reading about it, and I&#8217;ve downloaded and browsed through the 0.9.9 distribution. So far it looks really cool, and I like that the developers want to make it seem like a single-threaded program, because I&#8217;m not looking forward to debugging thread race conditions and all that crap. Another big plus for Darkstar, in my book.</p>
<p>If things pan out, I am going to be releasing a multiplayer Flash game. Some folks were balking at the idea of using Unity for <a href="http://liladreams.creatrixgames.com/blog/">Lila Dreams</a>, but I still think that&#8217;s the way I&#8217;m going for that project. But it doesn&#8217;t mean I&#8217;m done with Flash, because I have a closet full of game concepts that I&#8217;d love to be able to create eventually. <a href="http://pushbuttonengine.com/">PushButton Engine</a> is still very much on my radar. And, as I&#8217;ve said elsewhere, I choose the technology based on the needs and goals of a project and its parameters. I&#8217;m not a fanboi of any particular technology, platform, programming language, etc. I just use what makes the most sense on a case by case basis.</p>
<p>Maybe Darkstar will become my server technology of choice. I need more time to dig deeper and find out what it&#8217;s really like to use it on something that is non-trivial. Does it really provide a lot of virtual world infrastructure as compared to SmartFox? Is it viable for indies? I guess you can find the answers when I post again on this topic in the near future! <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://geekspeak.creatrixgames.com/better-than-smartfox-researching-project-darkstar-server.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Two weeks with Unity: Flash what?</title>
		<link>http://geekspeak.creatrixgames.com/two-weeks-with-unity-flash-what.html</link>
		<comments>http://geekspeak.creatrixgames.com/two-weeks-with-unity-flash-what.html#comments</comments>
		<pubDate>Tue, 07 Apr 2009 14:00:40 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=238</guid>
		<description><![CDATA[I&#8217;ve got most of my Flash work on hold at the moment, because I&#8217;m basically abandoning my own Flash game engine in favor of the upcoming PushButton Engine. I invested a lot of time, blood and sweat into my own engine and even built a nice editor. But, the friction of trying to push that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got most of my Flash work on hold at the moment, because I&#8217;m basically abandoning my own Flash game engine in favor of the upcoming <a href="http://pushbuttonengine.com/">PushButton Engine</a>. I invested a lot of time, blood and sweat into my own engine and even built a nice editor. But, the friction of trying to push that forward while also trying to prototype new ideas is enormous&#8211;especially after using Unity.</p>
<p>I will detail my thoughts and experiences with PushButton Engine in a later post (I haven&#8217;t used it much, and it&#8217;s not quite production ready), but I can offload a huge amount of effort and leverage the work of a bunch of really smart people. But, I digress.</p>
<p><b>This post is about <a href="http://unity3d.com/">Unity</a>.</b> It&#8217;s been about two weeks since I started working with Unity. Because it&#8217;s a 3d engine and doesn&#8217;t use ActionScript, it had the effect of forcing me to learn more than just the Unity API and editor.</p>
<p><b>I&#8217;ve become a 3d modeler.</b> Yes, I&#8217;ve bitten the bullet and learned about <a href="http://www.blender.org/">Blender</a>. Turns out it&#8217;s a really nice tool, it&#8217;s free, and it&#8217;s a lot of fun! I haven&#8217;t animated anything yet, but that&#8217;s coming up real soon.</p>
<p>I have created several models during my learning stages (over the past few months in between everything else), and I think one day I will be decent at it. I&#8217;ll never be great, but I can probably model most of the stuff my small projects will require. Albeit, this is something that will require <em>a lot</em> of practice. I don&#8217;t expect much in the way of pleasing results for a while. But that won&#8217;t stop me from making new games.</p>
<p><b>I&#8217;ve learned C#.</b> Unity uses <a href="http://mono-project.com/Main_Page">Mono</a> (an implementation of .NET), and I don&#8217;t like UnityScript (ECMA script, basically) because that&#8217;s how I roll. I prefer a verbose, strongly typed, <i>manly</i> language, and C# delivers. It wasn&#8217;t hard to learn since it&#8217;s close to C++, ActionScript, and Java, and I know all of those already. I did buy a book, though, for reference and some deeper learning as my Unity projects increase in complexity. Overall, C# has been fun, but not as fun as learning Blender. <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s how I would sum up my experience with Unity from a total noob standpoint:</p>
<ul>
<li>Realize that almost every core game engine system is already implemented: input, physics, collision detection, rendering, runtime game object management, editing tools, web connectivity, asset management, etc. It&#8217;s all there.</li>
<li>Hit a few annoying oversights: font handling, lack of collision groups/filtering, a very minor particle system missing feature (rotation/spin). Realize that you can still do 99% of what you want to without developing a huge infrastructure of your own.</li>
<li>Proceed directly to game logic programming. Do not mess with low level minutia at all, other than learning the API.</li>
<li>Become joyous and explode with glee.</li>
</ul>
<p>So, yeah. Basically, <strong>you just go straight to the fun parts!</strong> <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I am working on a simple learning project which I will release soon, and I honestly think that if I had known how to model, how to code C#, how to use Unity&#8217;s API that I could have made this game in a few days, tops. The art and sound will be more time consuming than making the game itself!</p>
<p>This is such a huge change from Flash, especially when I was slogging away on my own engine, trying to get to a point where I could do what I am now doing in Unity. I just want to get the heck on with making a game. I&#8217;m not the kind of guy who enjoys low level system programming. Some coders like that stuff, and&#8211;bless their hearts&#8211;now I don&#8217;t have to. <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> </p>
<p>All the hype is true. <strong>Unity is everything you&#8217;ve heard that it is.</strong></p>
<p>I won&#8217;t totally abandon Flash (yet), but at this point Flash has specific, limited utility (2d games that need a specific look and games that require massive audience reach) whereas before I viewed it as obvious and clearly superior choice for web games. <em>No more!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://geekspeak.creatrixgames.com/two-weeks-with-unity-flash-what.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Free, managed Flash multiplayer APIs</title>
		<link>http://geekspeak.creatrixgames.com/free-managed-flash-multiplayer-apis.html</link>
		<comments>http://geekspeak.creatrixgames.com/free-managed-flash-multiplayer-apis.html#comments</comments>
		<pubDate>Fri, 27 Feb 2009 03:39:45 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=197</guid>
		<description><![CDATA[There are some interesting things brewing for Flash multiplayer (and monetization, but that&#8217;s another post). I&#8217;ve noticed the rise of several hosted solutions that intend to make the creation of multiplayer Flash games simpler. I&#8217;m all about using middleware. I have no ego or hangups about parts of my game code being &#8220;not invented here.&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>There are some interesting things brewing for Flash multiplayer (and monetization, but that&#8217;s another post).</p>
<p><img src="http://geekspeak.creatrixgames.com/wp-content/uploads/2009/02/ping_pong.jpg" alt="flash-multiplayer-api" width="400" height="290" class="alignright size-full wp-image-201" /> I&#8217;ve noticed the rise of several hosted solutions that intend to make the creation of multiplayer Flash games simpler. I&#8217;m all about using middleware. I have no ego or hangups about parts of my game code being &#8220;<a href="http://en.wikipedia.org/wiki/Not_invented_here">not invented here</a>.&#8221; I just want to solve the problems robustly and with as little effort as necessary so I can focus on the real meaningful parts, like gameplay.</p>
<p>Here are services I know of. These all host your game, manage the servers, and offer other services around that theme.</p>
<h3>Nonoba</h3>
<p><a href="http://nonoba.com/">Nonoba</a> provides a multiplayer API, and while they seem to have some nice features, I was less than impressed with their lack of responsiveness in the developer forums. With this kind of thing, customer service is at the top of the list for reasons I will go with one provider over another. I don&#8217;t want to hit a snag and be left hanging. Some might be turned off by the fact that your server code will need to be C# (but client is Flash).</p>
<h3>iminlikewithyou (now called omgpop)</h3>
<p><i>UPDATE: I&#8217;m not sure they offer an API anymore. If they do, they&#8217;re hiding it really well. I couldn&#8217;t find it on their site.</i><br />
<span style="text-decoration:line-through"><a href="http://iminlikewithyou.com/">iminlikewithyou</a> has a similar offering, where they host the servers and give you a simple API. It doesn&#8217;t seem like a bad service, but I&#8217;m not sure how tightly a game using their API would need to be integrated with their website</span> (it&#8217;s <span style="text-decoration:line-through">also</span> a social gaming site).</p>
<h3>Whirled</h3>
<p><a href="http://www.whirled.com/">Whirled</a> has a multiplayer API, although the games must be tightly integrated with the site. I find this strangely appealing, maybe because I like Whirled and the idea of building a game specifically to fit into it seems like a unique kind of challenge and opportunity to make something different. I&#8217;m also a big fan of that rascal, Daniel James, so there&#8217;s a lot of trust inherent in working with the platform. And, shoot, they give away a pile of money every few months to the best new games.</p>
<h3>come2play</h3>
<p><a href="http://www.come2play.com/">Come2Play</a> offers a beta API and server hosting, too. The Api is currently limited to 2 players, but apparently they plan to support unlimited players later. They also may put ads in your preloader, although you will get 50% of that revenue. Their angle seems to be making it easy to put your games on social websites like Facebook or MySpace.</p>
<h3>Neutron/Photon</h3>
<p>Exit Games&#8217; <a href="http://www.exitgames.com/product/neutron">Neutron</a> and <a href="http://www.exitgames.com/product/photon">Photon</a> are a pair of APIs/services which provide high level features like lobby, chat, and even billing infrastructure as well as UDP/TCP networking (obviously Flash won&#8217;t be using UDP but Unity could) and full hosting for games. This seems like a very promising service, and it&#8217;s got a pretty impressive client list.</p>
<p>I like this trend! It tends to force you to be reliant on the service provider, but it also sweeps a lot of barriers out of your way. For small games, this could be a real boon.</p>
<p>But the obvious downside is the vendor lock-in, and also Nonoba and iminlikewithyou force your games to display their chat sidebar/lobby. I really don&#8217;t like that, but, again, considering what you get and the price (free!), this isn&#8217;t a bad deal for certain types of games.</p>
<p>I would not launch anything too ambitious on these services, but I might actually give them a spin for experimentation&#8217;s sake. They could be great testbeds for learning lessons to apply to larger projects, things like community management, marketing, development cycles (launch and inevitable updates), etc.</p>
<p>So what similar services do you know of that I have missed? Leave a comment, and let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://geekspeak.creatrixgames.com/free-managed-flash-multiplayer-apis.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.437 seconds -->
