<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Junction is a new indie game by Void Star Creations coming soon to PC. It is an ambitious project to meld world building, fun game play, and your social universe. 

Here we will talk about Junction and the technology we are using to make the next big thing! 

You can sign up here for beta access: http://codenamejunction.com/

Follow us on Twitter and Facebook too!</description><title>Codename: Junction</title><generator>Tumblr (3.0; @codenamejunction)</generator><link>http://codenamejunction.tumblr.com/</link><item><title>Things you should know when launching a Kickstarter project</title><description>&lt;p&gt;&lt;span&gt;The first thing you should do is simply jump in. Stop reading a bunch of articles about doing a Kickstarter and just do it. You will learn a lot by doing. Then go back and read about it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Things to know: &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- You can fill out all the info for your Kickstarter project and then share a link with people to get feedback.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- It can take a few days to be approved. If you choose the fixed funding duration, then once you are approved you then get to choose when to launch. You don&amp;#8217;t need to worry about it going live unexpectedly after approval.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Signing up for Amazon Payments is a bit of a pain in the butt. Start that process well in advance of your launch because it can take up to a week. Companies need to use a fax machine (yuk) to fax a bank statement and EIN filing.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- You can change the following after you submit:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;span&gt;Your video&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Your main image&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Any part of your description&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Your profile&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Your FAQ&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;You can add incentives&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;You can remove incentives if no one has pledged at that level&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;span&gt;- Putting together a Kickstarter takes LOTS OF TIME. We have spent several man-weeks putting ours together.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now things you should do:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Study other similar Kickstarter projects. Most well funded projects have a great video, but if you are reading articles about Kickstarter you already know this.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Contact people that have backed numerous projects in our category (some have backed several hundred projects). These people probably know better than you what resonates with the community. You are almost certainly too close to your project and there are probably things you assume people will know or figure out. You are probably wrong.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- If things aren&amp;#8217;t working out, change things.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- I am no marketing expert, but I do know you need to market your Kickstarter. Do it any way you can. If you launch and pray you will almost certainly fail.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Be reasonable with your goal. If you are raising several hundred thousand dollars for a game and you aren&amp;#8217;t a major player in the industry, or have some massive following external to Kickstarter, then you will almost certainly fail.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- LOTS of worthy projects fail.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Good luck!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We just launched our Kickstarter today&amp;#8230; time will tell if this advice is worth anything!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.kickstarter.com/projects/voidstar/poker-smash-for-pc"&gt;Back Poker Smash on Kickstarter!&lt;/a&gt;&lt;/p&gt;</description><link>http://codenamejunction.tumblr.com/post/43416803292</link><guid>http://codenamejunction.tumblr.com/post/43416803292</guid><pubDate>Mon, 18 Feb 2013 14:00:49 -0500</pubDate></item><item><title>A Free Game CAN Make it on Kickstarter - Congrats to Greed Monger!</title><description>&lt;p&gt;Since I joined Void Star Creations to help with Junction back in March we have been keeping our eye on Kickstarter to raise funds and create a ground swell of support. Kickstarter is an amazing platform that provides exposure and funds to worthy (and some less worthy) projects that might ordinarily not see the light of day. There are many engineers, designers, film makers, etc out there that have amazing passion for their work, the ability to create something truly unique, and the drive to do it. But that isn&amp;#8217;t always enough. Enter: Kickstarter.&lt;/p&gt;
&lt;p&gt;We want to do a Kickstarter when the time is right. We thought this was several months ago, and we created a mockup Kickstarter page and video and got ready for a launch. Then we solicited some feedback from peers and the consensus was we weren&amp;#8217;t ready. We just didn&amp;#8217;t have the right message, and although our technology was significant, it didn&amp;#8217;t look pretty yet. One of the major things we struggled with in this process was whether to make Junction a paid game for Kickstarter, or to keep it free like we originally intended.&lt;/p&gt;
&lt;p&gt;On Kickstarter (and in life, in general) people like something tangible for their money. If people are going to pony up their hard earned cash for a video game, they want a copy. If the something is free, it is a tough sell to ask people to pay for it. That much seems obvious. To date, almost unanimously, successful video games on Kickstarter have offered a copy of the game as a reward to backers, most of the time at a discount. Seems perfectly logical, and it works very well. But what if you want to offer a free game? How can you offer people enough value to contribute funds?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.quora.com/Kickstarter/Can-a-free-video-game-make-it-on-Kickstarter"&gt;We asked this very question on Quora a few weeks back&lt;/a&gt;, and got a few thoughtful answers, but still felt no closer to a decision for Junction.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.kickstarter.com/projects/appleton/greed-monger-a-crafting-focused-sandbox-mmorpg" title="Greed Monger"&gt;Greed Monger&lt;/a&gt; has successfully answered that question, and definitely shown that a free game CAN make it on Kickstarter. Their goal was a modest $30k, but they were able to triple that number and raise $90k for a free game.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How did Greed Monger do it?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;They had a very well thought out Kickstarter page, a decent video, and they kept people up to date on Greed Monger incessantly. But, in my mind, this wasn&amp;#8217;t enough; they also needed proper incentives. Their incentives were very simple: they sold virtual real estate in their game. The more money you contributed, the more real estate you received. This is a concept very simple to understand, people understood where their money was going, and you can see in the numbers that people were willing to pay money for that real estate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Numbers Don&amp;#8217;t Lie&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;They had 243 backers at $25 to get one parcel of land, but then 122 backers at $100 for 4 parcels of land. One might expect (I certainly did) a heavy rate of decline in the desire to contribute additional money past the basic point of entry, but this did not prove to be the case. As a result, Greed Monger raised more money from the $100 tier than the two basic beta access tiers combined: $6675 for the $15 and $25 tiers vs $12,200 at the $100 tier. Amazing.&lt;/p&gt;
&lt;p&gt;But then their $300 tier was even more successful. They gave out a disproportionate amount of land at that level (16 parcels of land at $300 vs 4 at $100) and they had 63 backers pulling in $18,900. WOW is all I can say. That incentive clearly works.&lt;/p&gt;
&lt;p&gt;I have been studying Kickstarter for months and I have not seen such willingness to go beyond the basic tiers in any other game. &lt;/p&gt;
&lt;p&gt;-&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So the Answer is YES&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A free game can make it on Kickstarter. So that&amp;#8217;s the route we will go, and now we can go confidently.&lt;/p&gt;
&lt;p&gt;Look for the launch of Junction on Kickstarter in the next few months!&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;
&lt;p&gt;Void Star Creations&lt;/p&gt;</description><link>http://codenamejunction.tumblr.com/post/37717563777</link><guid>http://codenamejunction.tumblr.com/post/37717563777</guid><pubDate>Tue, 11 Dec 2012 11:05:00 -0500</pubDate><category>kickstarter</category><category>greed monger</category><category>video games</category><category>indie games</category><category>junction</category><category>free games</category></item><item><title>More Junction Videos!</title><description>&lt;p&gt;Air Combat!&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="252" src="http://www.youtube.com/embed/AjDjIvFzQws" width="448"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Ragdoll Part 1&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="252" src="http://www.youtube.com/embed/wJtwb_9YQvU" width="448"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Ragdoll Part 2&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="252" src="http://www.youtube.com/embed/EAqmC6pBRdI" width="448"&gt;&lt;/iframe&gt;&lt;/p&gt;</description><link>http://codenamejunction.tumblr.com/post/32817411534</link><guid>http://codenamejunction.tumblr.com/post/32817411534</guid><pubDate>Wed, 03 Oct 2012 15:16:00 -0400</pubDate></item><item><title>Junction Preview!</title><description>&lt;iframe width="400" height="300" src="http://www.youtube.com/embed/c8vLAZtAeyA?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Junction Preview!&lt;/p&gt;</description><link>http://codenamejunction.tumblr.com/post/32816279058</link><guid>http://codenamejunction.tumblr.com/post/32816279058</guid><pubDate>Wed, 03 Oct 2012 14:56:45 -0400</pubDate></item><item><title>All Unsubscribe Links are Broken</title><description>&lt;p&gt;Well, almost all of them.&lt;/p&gt;
&lt;p&gt;As we were writing a utility to send out newsletters for Junction we realized a weird problem with the way unsubscribe links work: they aren&amp;#8217;t secure.&lt;/p&gt;
&lt;p&gt;If you get a Google alert email and forward that on to someone else, the person you forwarded it to can unsubscribe you from the alert by clicking on the unsubscribe link. Same thing for most automated email, from Bloomingdale&amp;#8217;s to The New York Times to Groupon. Do you trust everyone you forward these emails to not click that link? &lt;/p&gt;
&lt;p&gt;Did I just blow your mind? Probably not. But, I do find it strange that nobody seems to talk about this more often. In fact, I don&amp;#8217;t think I have never heard anyone else talk about this.&lt;/p&gt;
&lt;p&gt;The solution to the problem is simple: require an extra email to be generated that only has a removal code. That is something you wouldn&amp;#8217;t forward as there would be no purpose. The problem there is that people that want to be removed simply don&amp;#8217;t want anymore email from you. They are probably already angry they just received that first email from you, so sending them another email will probably piss them off even more.&lt;/p&gt;
&lt;p&gt;I am sure a lot of developers understand this gotcha, but how many non-developers realize this when forwarding their emails? Does anyone redact the unsubscribe link on a regular basis when forwarding emails?&lt;/p&gt;
&lt;p&gt;What&amp;#8217;s your stance on this? Should applications take the extra step to secure the removal, or should we just let this become a real problem before it gets a fix?&lt;/p&gt;</description><link>http://codenamejunction.tumblr.com/post/28646173376</link><guid>http://codenamejunction.tumblr.com/post/28646173376</guid><pubDate>Fri, 03 Aug 2012 16:01:23 -0400</pubDate></item><item><title>Streaming (Near) Real Time Events to the Web for Junction</title><description>&lt;p&gt;We came up with an interesting solution to the problem of streaming game events to the web and thought we would share with the community. Please let us know what you think! &lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;h2&gt;The Problem&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;We want people on the web to be able to see, in near real time, what players are doing in-game.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;Intro&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;There are myriad ways of sending events of in-game actions server-side, so we won&amp;#8217;t go into that. What we will go into is how we were able to store, query, and send these updates to a web page in an efficient, scalable manner. On the server side team we are more data experts and hackers than web developers, so there may be some more efficient ways to do little pieces of the puzzle. But, in general, we think this solution is simple, works very well, and should be very scalable.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;Technologies Used:&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;EC2&lt;/strong&gt; - Virtual Servers (Please sir, can I have some more?)&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Jetty&lt;/strong&gt; - Java web service to collect events, serve data, and stream the events (we created an internal proprietary REST API)&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Memcache&lt;/strong&gt; - Store the latest events per user in memory in a scalable cluster&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;DynamoDB&lt;/strong&gt; - Persistent storage of events, other data&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Apache/PHP&lt;/strong&gt; - Web server for presentation layer&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;JQuery/Javascript/HTML&lt;/strong&gt; - Client side manipulation of the events&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;Part 1: Persistence of Events for Near Real Time Query&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;We had delusions of complicated grandeur when we first started thinking of an architecture to distribute events to the right place. Do we use a queue service? Poll our persistent store (DynamoDB)? Setup an in-memory MySQL cluster? Broadcast the event to all web servers? Keep track of all realtime streams and broadcast events to the appropriate server?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;All are troublesome for various reasons. Some are complicated. Some require new dedicated servers. Some just won&amp;#8217;t scale well.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;Since we already make use of Memcache for other caching, and Amazon has a nice service to allow scaling Memcache without direct server management, we thought about ways to use Memcache for near real time events. &lt;/div&gt;
&lt;br/&gt;&lt;div&gt;&lt;/div&gt;
&lt;div&gt;The actual solution was simple, whenever a new event is registered, we simple push it to Memcache with a key of lastevent|&amp;lt;userid&amp;gt;. A put to Memcache is very quick (~1 millisecond), so the amount of overhead to do this is negligible. We can expire these events very quickly too, we used a 2 second timeout.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;Then to sense a new event all we do is simply poll Memcache every 1/2 second. Again, these operations are very quick, they take about 1 millisecond per query. Now if there were 10000 people online at once we might feel the heat, but if that were the case we could afford to throw some more Memcache instances at the cluster, and this is easy to do with Amazon&amp;#8217;s ElastiCache.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;So our methods of storage and query events are solved, on to streaming!&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;Part 2: Sending a Near Real Time Stream of Events&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;This part is easier than you think. Really all you need is a loop in a Java servlet to poll Memcache for new events, and if there is a new event you spit it out and flush the stream. There is just one little pitfall you need to avoid: endless loops. You will need to check the stream periodically to make sure it hasn&amp;#8217;t closed, or else you could be just building up threads and eventually run out, not to mention do a lot more work than is necessary.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;Here is the code for servlet:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;String id = request.getParameter( "id" );
String lastEvent = "dummy";
int i = 0;
pr.append( "" );
while( !pr.checkError() )
{
	String event = getLastEvent( id );
	if( !event.equals( lastEvent ) )
	{
		pr.write( event );
		pr.write( '\n' );
		pr.flush();
		lastEvent = event;
	}
	Thread.sleep( 500 );
	if( ++i % 5 == 0 )//every 2.5 seconds put something out to the stream so pr.checkError() can know if it is closed or not
	{
		pr.write( '\n' );
		pr.flush();
	}
}
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Obviously we paraphrased a bit here, but that is almost all of the code ofr our servlet. It works swimmingly.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;The only problem with this methodology we see is that if events come in faster than every 1/2 second then we may not catch them. But we aren&amp;#8217;t trying to be perfect here, so it was deemed an ok sacrifice. You can always poll faster/slower if necessary, or use that memcache grab to trigger more complicated logic, like a query to the persisted data layer for ALL new events in the last second or so.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;Part 3: Getting Those Events to the Web Page&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;This is where we ran into issues. Stupid browser security!&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;Our first instincts were to use JSONP to output a stream of functions with json inside, so basically like this:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;displaystuff( { "event": "kicked a box of donuts" } );
displaystuff( { "event": "ran into a donkey that he swears he knew from somewhere" } );
displaystuff( { "event": "read the lord of the rings trilogy backwards" } );
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;etc.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Have a function in the main page like this:&lt;/div&gt;
&lt;br/&gt;&lt;blockquote&gt;
&lt;pre&gt;&amp;lt;script&amp;gt;
function displaystuff( json )
{
	//do something with the json to make it display in the webpage
	//something like 
	var html = processJson( json );//some function that does stuff with the json
	$("#liveevents").prepend(html);//need jquery for this one, this will prepend our html where we want it
}
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;And then include the url as a javascript include:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;&amp;lt;script src="http://&amp;lt;server&amp;gt;/live?id=&amp;lt;userid&amp;gt;"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br/&gt;&lt;div&gt;It turns out that the browsers don&amp;#8217;t want this to happen. The browsers wanted the entire file to be downloaded before evaluation would begin, and since we are streaming it potentially forever, the functions would never be run. Also, an even bigger issue is that javascript includes are no asynchronous, so the page would hang when it got to that javascript include. Booooooo.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;So JSONP isn&amp;#8217;t the way to go. And javascript includes aren&amp;#8217;t the way to go either&amp;#8230; so we thought we were in a pickle. Not the good kind of pickle either.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;&lt;strong&gt;Iframes to the rescue!&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;Iframes load asynchronously. Yay! &lt;/div&gt;
&lt;div&gt;Iframes can be invisible. Double yay!&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;If we change our include to an iframe like this:&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;&amp;lt;iframe height="0" width="0" src="http://&amp;lt;server&amp;gt;/live?id=&amp;lt;userid&amp;gt;" style="visibility:hidden;display:none"&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;The page will load asynchonrously, so we can put that anywhere we like.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;Ok that solves the page stalling problem, but what about an alternative to JSONP? &lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;It turns out that because we are effectively streaming a webpage in the iframe, and the browser will render webpages as they stream, we can just put full fledged javascript in that frame like this:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;blockquote&gt;
&lt;pre&gt;&amp;lt;script&amp;gt;displaystuff( { "event": "kicked a box of donuts" } );&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;displaystuff( { "event": "ran into a donkey that he swears he knew from somewhere" } );&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;displaystuff( { "event": "read the lord of the rings trilogy backwards" } );&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;As each line gets flushed, the javascript can be executed by the browser. We are winning!&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;&lt;strong&gt;Not so fast there partner. That function can&amp;#8217;t be found, and even if it was, you don&amp;#8217;t have permission to execute it anyways!&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;After a few hours of frustration, trial, error, and tears (not necessarily in that order) we found the solutions:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;Because we are running Apache/php for our presentation layer, and Jetty as our data server (so both the game and the website have the same access to everything), they will need to be hosted on different servers, and some browsers are a bit picky about this to protect you against cross-domain javascript hacks.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;Back in the servlet we need to add&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;pr.append( "&amp;lt;script type=\"text/javascript\"&amp;gt;document.domain=\"yourdomain.com\";&amp;lt;/script&amp;gt;" );&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;before the while loop.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;And in the main html document we need to add&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;&amp;lt;script type="text/javascript"&amp;gt;document.domain="yourdomain.com";&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;Obviously substitute your actual domain for yourdomain.com. Unless that is your domain, in which case that is a pretty big coincidence.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Then for the output of the stream we just refer to the &amp;#8220;parent&amp;#8221; document like this:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;&amp;lt;script&amp;gt;parent.displaystuff( { "event": "kicked a box of donuts" } );&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;parent.displaystuff( { "event": "ran into a donkey that he swears he knew from somewhere" } );&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;parent.displaystuff( { "event": "read the lord of the rings trilogy backwards" } );&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;&lt;/div&gt;
&lt;br/&gt;&lt;div&gt;
&lt;h3&gt;And we are golden!&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;div&gt;The result is an asynchronous iframe that streams in function calls to the main page and inserts html whenever a new event is found. It is very lightweight and suits our needs very well, while avoiding the ugly HTTP polling of some other solutions.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;</description><link>http://codenamejunction.tumblr.com/post/21446912421</link><guid>http://codenamejunction.tumblr.com/post/21446912421</guid><pubDate>Fri, 20 Apr 2012 15:34:57 -0400</pubDate></item><item><title>More Screencaps of Junction!</title><description>&lt;p&gt;Check out some more screencaps of the &lt;a href="http://codenamejunction.com"&gt;upcoming game Junction!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://codenamejunction.com"&gt;&lt;img src="http://cnj.s3.amazonaws.com/screencap/1956176/fb506663980/1334782474678.large"/&gt;&lt;/a&gt; &lt;a href="http://codenamejunction.com"&gt;&lt;img src="http://cnj.s3.amazonaws.com/screencap/1956176/fb506663980/1334788983832.large"/&gt;&lt;/a&gt; &lt;a href="http://codenamejunction.com"&gt;&lt;img src="http://cnj.s3.amazonaws.com/screencap/1956176/fb506663980/1334352802874.large"/&gt;&lt;/a&gt; &lt;a href="http://codenamejunction.com"&gt;&lt;img src="http://cnj.s3.amazonaws.com/screencap/1956176/fb506663980/1334352214303.large"/&gt;&lt;/a&gt; &lt;a href="http://codenamejunction.com"&gt;&lt;img src="http://cnj.s3.amazonaws.com/screencap/1956176/fb506663980/1334351906585.large"/&gt;&lt;/a&gt; &lt;a href="http://codenamejunction.com"&gt;&lt;img src="http://cnj.s3.amazonaws.com/screencap/1956176/fb506663980/1334346970315.large"/&gt;&lt;/a&gt; &lt;a href="http://codenamejunction.com"&gt;&lt;img src="http://cnj.s3.amazonaws.com/screencap/1956176/fb506663980/1334870347300.large"/&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://codenamejunction.tumblr.com/post/21438992293</link><guid>http://codenamejunction.tumblr.com/post/21438992293</guid><pubDate>Fri, 20 Apr 2012 12:10:02 -0400</pubDate></item><item><title>Some sweet screenshots of Codename: Junction!</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lyzxtcaDXJ1rp1shio1_500.png"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_lyzxtcaDXJ1rp1shio2_400.png"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_lyzxtcaDXJ1rp1shio3_500.png"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_lyzxtcaDXJ1rp1shio4_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_lyzxtcaDXJ1rp1shio5_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_lyzxtcaDXJ1rp1shio6_500.png"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;p&gt;Some sweet screenshots of Codename: Junction!&lt;/p&gt;</description><link>http://codenamejunction.tumblr.com/post/17179500464</link><guid>http://codenamejunction.tumblr.com/post/17179500464</guid><pubDate>Mon, 06 Feb 2012 19:10:23 -0500</pubDate></item></channel></rss>
