<?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>if then else</title>
	<atom:link href="http://timothypoon.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://timothypoon.com/blog</link>
	<description>Writing more than you&#039;ll ever need</description>
	<lastBuildDate>Wed, 25 Apr 2012 21:54:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>In a Relationship</title>
		<link>http://timothypoon.com/blog/2012/04/19/in-a-relationship/</link>
		<comments>http://timothypoon.com/blog/2012/04/19/in-a-relationship/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 15:08:02 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Video Games]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[Journey]]></category>
		<category><![CDATA[Thatgamecompany]]></category>

		<guid isPermaLink="false">http://timothypoon.com/blog/?p=187</guid>
		<description><![CDATA[In real life, relationships are complex. In fact, human interaction of any sort is just about the most elaborate intermingling of social, psychological, and physical frameworks you’ll ever see. This is why successful movies, books, and television shows all focus on character growth and personal relationships; people love to see the intricacies at work. However, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://timothypoon.com/blog/wp-content/uploads/2012/04/a-physical-necessity.png"><img src="http://timothypoon.com/blog/wp-content/uploads/2012/04/a-physical-necessity.png" alt="" title="A Physical Necessity" width="100%" class="aligncenter size-full wp-image-521" /></a></p>
<p>In real life, relationships are complex. In fact, human interaction of any sort is just about the most elaborate intermingling of social, psychological, and physical frameworks you’ll ever see. This is why successful movies, books, and television shows all focus on character growth and personal relationships; people love to see the intricacies at work.</p>
<p>However, these relationships can be molded, contorted into being what we want and, more often, what we don’t want. Through textual mediums such as instant messenger or e-mail, the lack of vocal inflection requires you to be much more deliberate in your diction and phrasing lest you offend someone. Over the phone, facial expressions and hand gestures are lost as your intent is filtered through the wire, requiring your interjecting sighs and chortles to communicate what your physical being cannot.</p>
<p>Take, for (a relevant) example, Call of Duty’s multiplayer voice chat. Without a face to put to the voice, the entire framework of communication laid out by the game effectively forces you to dehumanize your opponents and teammates. To you, they are just a bucket in which you can dump your frustrations, angers, and occasional bits of jubilation. The problem is that this bucket can talk back. It can volley back retorts, obscenities, and racial slurs with the best buckets out there. The rote, mindless action of the game is wholly engrossing, leaving minimal mental faculties for maintaining human decency. This is how you end up with shouting matches and rage quits.</p>
<p>Which makes Thatgamecompany’s <em>Journey</em>’s co-op interactions altogether <a href="http://ngplusblog.wordpress.com/2012/03/16/friendship-fear-and-the-great-unknown/" title="Friendship, Fear, and the Great Unknown - New Game Plus">fascinating</a>. Everything is carefully crafted and placed to the sandy micrometer so as to form intensely personal relationships with what are ostensibly strangers and does so by forming a single, unique combination of two types of players. Although these numbers convey a sense of simplicity, the dependence on one another is as complex as you can find outside of the game’s rutilant sun.</p>
<p>At the most base interpretation of this affair, one person is a follower and the other is a leader (there is the chance that both parties mutually disengage from this enterprise, but that just makes them both a bad leader and a bad follower). Distilling it to such a rudimentary chemical reaction, though, is doing it a disservice. It is symbiotic necessity for mere existence.</p>
<p>As a leader, you must be brave and resolute. You must never falter or doubt yourself; your follower depends on you. You may not know where you are going or what you are doing, but you move ever forward; your follower has placed his trust in you. You can never quit; your follower believes in you.</p>
<p>As a leader, you are the lance that can pierce the unknown. Your intrepidness is the stalwart beam coming from the lighthouse leading you home. You are not a leader because you chose to be but because it was required of you. Without you, your partner is lost, sad, and alone. You have saved him from the gutter and placed him in your warm embrace where you can be the guiding light he needs to survive.</p>
<p>As a follower, you are reticent and reliable. You acknowledge your leader’s strength and ferocity but never question your own; you are the foundation upon which this relationship is built. You trust your leader because he trusts you; your leader would be nothing without you. You can never quit; your leader needs you.</p>
<p>As a follower, you are the armor that protects from the unknown. Your unwavering commitment is the boat you two will ride to shore and safety from the dangers of the turbulent sea. You are not a follower because you chose to be but because it was required of you. Without you, your partner is lost, sad, and alone. You walk by his side as the fuel to his fire that you both cannot live without.</p>
<p><em>Journey</em> reduces multiplayer to one of the most basic types of relationships two people can have, but they’ve rebuilt it into one of the most maddening, heart-wrenching, enigmatic examples of beautiful codependency you’ll ever see. It doesn’t matter if you are the leader or the follower; applying those labels diminishes the significance of your relationship. You are one half of a whole. Without you, this gestalt does not exist.</p>
<p>Every emotion I’ve ever had for a sibling, a friend, a lover, or even a stranger I have felt playing <em>Journey</em>. By finding the bedrock upon which all other relationships are built, the game allows you to fill in the gaps with your own experiences and desires, whether you are aware of it or not. Some of you may be turned off by the blank emotional canvas presented to you where all the brushes are already dipped in affection and fellowship, but perhaps that is because you lack the trust to be a follower or the strength to be a leader. You are not playing your role for yourself. You are playing for this unknown person, this stranger that will become your light in the underground, this stranger that will become your fire on the snowy mountaintops.</p>
<p>This stranger that will become a <a href="http://www.iep.utm.edu/lawofnat/#SH2b" title="Laws of Nature [Internet Encyclopedia of Philosophy]">physical necessity</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://timothypoon.com/blog/2012/04/19/in-a-relationship/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Friendship, Fear, and the Great Unknown</title>
		<link>http://timothypoon.com/blog/2012/04/09/friendship-fear-and-the-great-unknown/</link>
		<comments>http://timothypoon.com/blog/2012/04/09/friendship-fear-and-the-great-unknown/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 15:04:36 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Video Games]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[Journey]]></category>
		<category><![CDATA[Thatgamecompany]]></category>

		<guid isPermaLink="false">http://timothypoon.com/blog/?p=192</guid>
		<description><![CDATA[I could hear the hollow bellow from above. Even over the unrelenting, roaring wind, I could hear it. I could see the white-hot gaze just ahead. Even through the snowy, sideways haze, I could see it. Against it all, I prayed I was safe. I prayed we were safe. “Oh god oh god,” I heard [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://timothypoon.com/blog/wp-content/uploads/2012/04/friendship-fear-and-the-great-unknown.png"><img src="http://timothypoon.com/blog/wp-content/uploads/2012/04/friendship-fear-and-the-great-unknown.png" alt="" title="Friendship, Fear, and the Great Unknown" width="100%" class="aligncenter size-full wp-image-505" /></a></p>
<p>I could hear the hollow bellow from above. Even over the unrelenting, roaring wind, I could hear it.</p>
<p>I could see the white-hot gaze just ahead. Even through the snowy, sideways haze, I could see it.</p>
<p>Against it all, I prayed I was safe. I prayed <em>we</em> were safe. “Oh god oh god,” I heard myself mutter over and over again, waiting for the terror to pass, huddled in the shadows of this rocky remnant. I turned to my companion.</p>
<p>But he was gone.</p>
<p>Tracks laid were he once stood. Following with my eye the path he now foolishly plowed, I could see him out in the distance. Darting back and forth between him and the skyward beast, my eyes could only attempt to communicate what my voice could not.</p>
<p>“Hey! Come back! Come back!”</p>
<p>It was pointless. The howling winter gusts swallowed my fevered pleas. But suddenly, the empty stare from above turns aggressive, rutilant. My words disappear. My stomach drops.</p>
<p>I begin to step out into the biting air. “Oh god oh god.” The feral creature begins to screech, leering back, preparing to strike. “Move faster! Faster!” I begin to run, dragging my feet through the knee-high powder. “If I can just reach him…” Unfinished thoughts rattle through my mind, unfinished because the ending unfathomable. Inevitable.</p>
<p>My scarf trails in the pale storm, flapping and twisting in the wind. It marks the path of a fool, a sap. Then, the fiend lurches forward, cutting through the frozen air with a searing, unknowable hate.</p>
<p>He collapses. I reach out.</p>
<p>Closer it comes.</p>
<p>He gives up. I refuse.</p>
<p>Screaming in, faster and faster.</p>
<p>He waits for his end. I touch his arm.</p>
<p>And to think, I didn’t even know his name.</p>
<hr />
<p>Meeting strangers is like playing <a href="http://en.wikipedia.org/wiki/Pachinko" title="Pachinko - Wikipedia, the free encyclopedia">pachinko</a>. Each time you meet a new one, you are dropping them into your own game of interpersonal fortune. You watch them, sometimes subconsciously, trickle down the ornate and noisy pegboard, bounding around, clinking and clanking from side to side until they come to a sudden and resolved stop.</p>
<p>Will they fall into your good graces and become a friend? What if they fall off the board completely and a stranger is all they will ever be? Tumbling and turning, they are as curious as you.</p>
<p>It’s awe-inspiring, then, when you come across an occasion where those transients you meet during your endeavors take a straight, unwavering path to a reserved and guarded place within you. They cut through the swath of pins and quickly arrive at somewhere much more intimate.</p>
<p>Such as it is with <em><a href="http://us.playstation.com/games-and-media/games/journey-ps3.html" title="Buy Journey™ game for PS3™ System - Play Journey™, an adventure game from PlayStation®">Journey</a></em>, the latest release from artsy developers <a href="http://thatgamecompany.com/" title="thatgamecompany | TGC">Thatgamecompany</a>, and it is a grand experiment in pure, uncut game design. There are no spoken words, no exposition with which to tell you how to interpret the world around you. The title itself is all the instruction you need.</p>
<p>Everything is designed to move you forward. From the way you ski down the sandy dunes of the desert slopes to how the game has removed any possibility for negative progression, this game is about the journey. Even with the multiplayer, they have eliminated any opportunity to grief.</p>
<p>And I truly believe this game was made for multiplayer. Every conceit and every design minutia is put in place to foster a bond between two strangers. Communicating bolsters your flight; being in close proximity provides a warming heat of golden light; and your meditative transitions are positioned to show you are only one half of this experience.</p>
<p>The choice to prohibit voice and text chat while online is a bold and powerful one. You may not realize it, but just hearing how someone sounds or seeing the words they choose informs you with an immediate and everlasting impression.</p>
<p><em>Journey</em>, however, lets you fill in the gaps for yourself. With no voice—just a melodic chirp to convey intent—you are free to turn that warble into whatever you desire. Every little peep told me a tale of joy in cooperatively conquering a puzzle or filled me with great despair as we both realize our journey has taken a turn for the worse. There is a gravitas you can create yourself that you could not do so otherwise with text and dialogue.</p>
<p>An intimate and familiar relationship is formed. An unqualified kinship develops universally and immediately. I had become frustrated with my companions, even hated them at points, but never did I want to leave them. Their inability to keep up was endearing, and their need to constantly move ahead before I was ready was misguided (or perhaps misinterpreted) concern for making sure the way was safe for us. The struggles we faced were our own and we would overcome them together.</p>
<p><em>Journey</em> is altogether and simultaneously the most exhilarating, most terrifying, and most bewildering experience I’ve had in such a long time, and it is a triumph in every sense of the word. There are moments of pure, abject fear that froze me in my seat. There are moments where I felt as free and flowing as a bird on the wind.</p>
<p>There are moments where I knew I was playing something special.</p>
]]></content:encoded>
			<wfw:commentRss>http://timothypoon.com/blog/2012/04/09/friendship-fear-and-the-great-unknown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Going Backwards: Looking at Uncharted 3</title>
		<link>http://timothypoon.com/blog/2011/11/23/going-backwards-looking-at-uncharted-3/</link>
		<comments>http://timothypoon.com/blog/2011/11/23/going-backwards-looking-at-uncharted-3/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 15:47:16 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Video Games]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[Naughty Dog]]></category>
		<category><![CDATA[Uncharted]]></category>
		<category><![CDATA[Uncharted 2]]></category>
		<category><![CDATA[Uncharted 2: Among Thieves]]></category>
		<category><![CDATA[Uncharted 3]]></category>
		<category><![CDATA[Uncharted 3: Drake's Deception]]></category>

		<guid isPermaLink="false">http://timothypoon.com/blog/?p=181</guid>
		<description><![CDATA[You wake up on a train. You notice it’s not moving but neither are you. A wave of pain hits you as you try to stand. Looking down, you see blood. A lot of blood. Your blood. You can see outside the broken window and see that it is snowing, but something is wrong. You [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/11/uncharted-2-train.jpg"><img class="aligncenter size-full wp-image-182" title="Uncharted 2: Among Thieves" src="http://timothypoon.com/blog/wp-content/uploads/2011/11/uncharted-2-train.jpg" alt="" width="100%" /></a>You wake up on a train. You notice it’s not moving but neither are you. A wave of pain hits you as you try to stand. Looking down, you see blood. A lot of blood.</p>
<p>Your blood.</p>
<p>You can see outside the broken window and see that it is snowing, but something is wrong. You start to come out of your daze and sort out what you’re seeing, but suddenly, a crate and then a barrel come flying by your head toward the back of the train. As they burst through the door, revealing nothing but emptiness below, your seat begins to give way. You scramble for more solid ground, but you know you are in trouble; this train is going down with you in it.</p>
<p>You fall through the car, rattling around like a Plinko ball, and eventually fall through to the railing just beneath the door. You are now dangling from the rear of the train, the very end of the line at the sheer face of the cliff. The mystery of how you got there takes a backseat.</p>
<p>You move, but it hurts. You climb, but it’s slow. You jump, grab, and clamber about, but you are dying. You are dying, and no one is there to watch.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/11/1728029-uc3.jpg"><img class="aligncenter size-full wp-image-183" title="Uncharted 3: Drake's Deception" src="http://timothypoon.com/blog/wp-content/uploads/2011/11/1728029-uc3.jpg" alt="" width="100%" /></a>You are watching two men walk down a dark English street. They enter a surprisingly lively pub where there are men drinking, talking, and, by and large, looking like thugs. This is because in almost caricature-like fashion, they are thugs. English thugs in a pub drinking beer, working the thug beat to ensure an underhanded dealing goes in the favor of their employer.</p>
<p>This is entirely new, what you’re seeing, but it’s still very familiar: two finely dressed cohorts are lead surreptitiously by meaner-looking men to a rather dapper and well-spoken gentleman. Apologies, introductions, brass tacks: it’s all above-board in the action adventure heist genre.</p>
<p>In the most dramatic and fore-telling fashion, a double-cross is revealed; the fellow with the tie and the British accent is screwing these two charming fellows out of money, an ostensibly valuable ring, and their well-being. A few quips and now they’re fighting, bar-style.</p>
<p>Every action is game-like, just as every movement is exaggerated and almost comical; bashing a fellow’s head with a cue stick, being dragged facedown across a bar and out a window, and throwing down with three confused but equally hostile foes upon landing are almost to be expected and soon after actually happen.</p>
<p>There is never any real gravitas here. It’s apparent from the outset that these two men, despite one’s advancing age and the other’s cheery disposition, are more than capable of handling themselves against these pawns (and the clichéd brute). For every hit they take, they are ready to deal three more until they make their way to the back alley for their less-than-ideal escape, but not before one last encounter with the bad guy.</p>
<p>Some storied banter leads to two implausible deaths; implausible because these are the leads. For all their trials and labored tasks, they cannot die. Their progress is forever locked in step towards the end of this story.</p>
<hr />
<p>You are either the hero or the spectator. Uncharted 3: Drake’s Deception took a step backwards from its predecessor and put you back into the role of an intervening viewer. You went from the natural reveal of Uncharted 2: Among Thieves where all your knowledge grew with Nathan’s through the game’s diegesis and the impetus of waking up on the train with a commensurate amount of confusion to simply observing another action fantasy. I’d much rather be the guy who saves the world than watch the guy who does it.</p>
<p>Even if I am dying.</p>
]]></content:encoded>
			<wfw:commentRss>http://timothypoon.com/blog/2011/11/23/going-backwards-looking-at-uncharted-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QuakeCon Dishonored Demo</title>
		<link>http://timothypoon.com/blog/2011/08/10/quakecon-dishonored-demo/</link>
		<comments>http://timothypoon.com/blog/2011/08/10/quakecon-dishonored-demo/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 15:17:06 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Video Games]]></category>
		<category><![CDATA[Arkane Studios]]></category>
		<category><![CDATA[Dishonored]]></category>
		<category><![CDATA[previews]]></category>
		<category><![CDATA[QuakeCon]]></category>

		<guid isPermaLink="false">http://timothypoon.com/blog/?p=173</guid>
		<description><![CDATA[If you aren’t familiar with Dishonored, that’s all right because I wasn’t either. All I knew heading into my QuakeCon demo was that it was a first-person shooter from Arkane Studios and there may or may not be rats. While both of those things are true, there is a whole lot more to Dishonored that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/08/Lord_Regent.jpg"><img class="aligncenter size-large wp-image-174" title="Dishonored - Lord Regent concept art" src="http://timothypoon.com/blog/wp-content/uploads/2011/08/Lord_Regent-1024x523.jpg" alt="" width="100%" /></a>If you aren’t familiar with <a title="Dishonored" href="http://www.dishonored.com/">Dishonored</a>, that’s all right because I wasn’t either. All I knew heading into my <a title="QuakeCon 2011 | August 4-7, 2011 @ Hilton Anatole, Dallas, TX" href="http://www.quakecon.org/">QuakeCon</a> demo was that it was a first-person shooter from <a title="Arkane Studios" href="http://www.arkane-studios.com/">Arkane Studios</a> and there may or may not be rats. While both of those things are true, there is a whole lot more to Dishonored that just Schrödinger critters.</p>
<p>Indeed, Dishonored is a game that takes place in the first-person perspective, but it is less of a shooter and more of a mixed action stealth game. You play as a “supernatural assassin” and are far more capable of inflicting pain than dealing with it. The natural recourse of this characteristic is stealth, and it is here in spades.</p>
<p>It has been most aptly described, I believe, as <a title="BioShock" href="http://www.bioshockgame.com/">BioShock</a> meets<a title="Thief (series) - Wikipedia, the free encyclopedia" href="http://en.wikipedia.org/wiki/Thief_(series)"> Thief</a> meets <a title="Deus Ex - Wikipedia, the free encyclopedia" href="http://en.wikipedia.org/wiki/Deus_ex">Deus Ex</a> meets <a title="Valve" href="http://www.valvesoftware.com/games/hl2.html">Half-Life</a>. When I first heard this, I thought that sounded a bit convoluted. That’s a lot of greatness to cram into one game (unless they meant it as merely the intersection of just the bad stuff from those four games, in which case oh sweet crikey). But as I watched more of Arkane’s cofounders <a title="Harvey Smith (video game person)" href="http://www.giantbomb.com/harvey-smith/72-3772/">Harvey Smith</a> and <a title="Raphael Colantonio (video game person)" href="http://www.giantbomb.com/raphael-colantonio/72-100109/">Raphael Colantonio</a> playing through Dishonored, I got it, and boy do I want more of it.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/08/Dishonored_ThugvsCityGuard.jpg"><img class="aligncenter size-large wp-image-176" title="Dishonored - Thug vs. City Guard" src="http://timothypoon.com/blog/wp-content/uploads/2011/08/Dishonored_ThugvsCityGuard-1024x576.jpg" alt="" width="100%" /></a>The demo starts off pretty simple with just some minor side street exploration and explanation of the game’s story and the mission’s objectives (to find and kill a lawyer). As I said before, you are a supernatural assassin, but you, as Corvo, actually used to be a bodyguard. That is until you are accused of murdering the Empress, the person you were hired to protect. Corvo claims Lord Regent framed him, but not many people are willing to buy your story. This bit of history will be explored at some point during the game, but not in this mission.</p>
<p>If you can’t tell by now, there is a heavy <a title="Victorian era - Wikipedia, the free encyclopedia" href="http://en.wikipedia.org/wiki/Victorian_era">Victorian era</a> influence on the game. I want to call it steampunk as there are some seriously modern elements to the world of Dunwall, but as not only do the developers want to avoid that label, it also seems that Dishonored doesn’t go far back enough into the retro half of the steampunk genre to make it fully fall under that banner. Generally speaking, the visuals are where I draw the largest similarities to BioShock, especially <a title="BioShock Infinite Twenty Minute Gameplay Demo — Platform Nation" href="http://www.platformnation.com/2011/07/08/bioshock-infinite-twenty-minute-gameplay-demo/">BioShock Infinite</a>. The colors are rather vivid and there is a lot of contrast in its palette.</p>
<p>The game also seems to play somewhat similarly to <a title="BioShock 2 Single-Player Review — Platform Nation" href="http://www.platformnation.com/2010/02/12/bioshock-2-single-player-review/">BioShock 2</a>. You can dual wield weapons, though your sword is always bound to your right hand whereas your left is free to brandish firearms, blades, and spells. A power wheel comes up when you want to reassign powers and weapons and looks very much like when you want to reassign your plasmids and guns in BioShock. The way button prompts for looting and contextual actions are also very similar, but I supposed there are worse things to borrow from.</p>
<p>We are soon shown a dead body where a bunch of rats are munching down. This offers a chance for the developers to show off some of the new lighting tech they’ve brought into the <a title="Unreal Technology" href="http://www.unrealengine.com/">Unreal Engine</a> and explain that the world has come under a rat plague that has killed off half its population. Rats flee from light, so once it is introduced into the scene, they scatter and we carry on.</p>
<p>This is where we begin to see some of the dynamic movement available to the player which definitely reminds me of <a title="Thief: Deadly Shadows - Controls - allgame" href="http://www.allgame.com/game.php?id=38901&amp;tab=controls">playing Thief games</a>. You can lean around corners and mantle ledges and whatnot and that rooftop access is always an option. From what I could see, though, some actions were based on controls such as press right bumper to lean or something, but others were just button presses to climb on top of this dumpster. This was never clarified as to what was and what wasn’t organic to the controls and what were contextual sequences mapped to the action button.</p>
<p>We proceed to come across a lone guard on the street and quickly take cover. When in hiding, white streaks will come across a certain radius of the player’s central vision and show from which direction people might be coming from and how much—if at all—they are alerted to your presence. They quickly and quietly take him down and dump his body in a nearby dumpster so as not to alert any other people who might wander by.</p>
<p>Walking down an alley, they spot a woman in dire need of help. Three thugs are assaulting her and Smith explains that many things like this will happen during your missions where you can choose to accept and engage in side quests or not. Whether you succeed or fail or even try or don’t will all have an impact on the mission and possibly the entire story. In this particular case, they choose to intervene and we are shown our first taste of combat.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/08/Combat04.png"><img class="aligncenter size-large wp-image-177" title="Dishonored - Combat04" src="http://timothypoon.com/blog/wp-content/uploads/2011/08/Combat04-1024x655.png" alt="" width="100%" /></a>They equip a pistol and a sword and step into the alley. A fire flickers against the back wall and lights the scene nicely, providing very dramatic ambiance for the ensuing battle. As they maneuver Corvo around the enemies and take pot shots, it is immediately clear that the firearm is fairly sticky in its aiming; just come close to an enemy with the reticule and it will do its best to keep its sights trained on your foe. This, along with later action sequences and ammo provisions, gives the impression that certain encounters will definitely play out more favorably with close quarter’s weapons with the ability to parry and block enemy melee attacks whereas others are more geared towards fighting from a distance and using your powers to gain tactical advantage over entrenched enemies.</p>
<p>The final bad guy is dispatched with a brutal decapitation. The woman offers her thanks, but is soon devoured by a swarm of rats. What a rough day.</p>
<p>We then begin the task of actually breaking into the mansion with its inhabitants unaware. When hidden, a bit of text at the bottom of the screen will come up and say [hidden] so you won’t have to wonder “can he see me? He probably can’t see me…oh god he can see me!” Smith and Colantonio then explain the game’s use of “3D audio propagation.” What this means for you the player is that audio dissipates and bounces accurately across elements in the game world. So if someone is walking through a hallway ahead of you, you can tell if he is coming from the right or from the left and how far away he is from the entrance.</p>
<p>Corvo is then impeded by the mansion entrance. Rather than go in guns blazing (always an option) and giving the target a chance to escape, they choose to instead go stealth, but not in the way of crawling around and hiding in shadows. Instead, they show off a new power where you can possess other living creatures. In this case, they take control of a rat and crawl through an air duct and into an empty room.</p>
<p>They have to make it quick because this is not just mind control; this is full body inhabitance. This means that when the rat dies due to being stepped on or falling down a hole or something, you also die along with it. This also means, however, that when you cease possession of the rat, you are then wherever the rat is, hence the empty room.</p>
<p>After hiding from a couple more guards in some dark shadows, they discuss guard AI. The AI in this game is totally dynamic, so you can’t just count on memorizing patterns and counting down passes to get by. While I’m sure some of it is predetermined, there is also that element of randomness where a guard may meander a bit or get distracted by a painting or go warm himself up by the fire.</p>
<p>At this point, we’re told we’re approaching the guard with the key to the room that the lawyer is holed up in, and that if we were to fail to obtain the key, the mission could then branch of in several ways, including him running for it, having to find an alternative way in, or the mission turning into a firefight. In this case, they end up killing him and picking up the key and proceeding to the lawyer.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/08/Sneak_Observation02.png"><img class="aligncenter size-large wp-image-178" title="Dishonored - Sneak Observation02" src="http://timothypoon.com/blog/wp-content/uploads/2011/08/Sneak_Observation02-1024x655.png" alt="" width="100%" /></a>Things get physical rather quickly, but given that Corvo has several special powers at his disposal, it all ends up in his favor. First, we are shown that though the rat plague could harm the player as well, we do have the power to summon them to attack enemies. Then they use a time freeze power at which point they can freely move around the space to brutally attack the opposition at their leisure. Lastly, they use a wind blast technique that is pretty much exactly what it sounds like. It actually most reminds me of the blast powers in the Infamous series (though, to be fair, it also looks like a dozen other games with this sort of power such as Skyrim).</p>
<p>During the battle, there are a couple things are somewhat meta to the game but totally organic to the world as well. The first is a chaos meter, which is the duality gauge of the game. It is not a morality meter like other games but rather a pure reflection of your impact on the amount of chaos in the world. If you keep killing people in an exceedingly irresponsible manner and fail to hide the bodies, you will increase your chaos meter significantly. On the other hand, if you manage to remain stealthy and keep the peace in the streets, the chaos meter will begin to drain.</p>
<p>Based on how chaotic you are as you complete mission, the story will change. It could be as small as certain side quests or avenues to your target are not accessible or have your mission dynamically chang objectives or could be as big as changing the outcome of the entire game. Needless to say, chaos is a very large part of Dishonored.</p>
<p>The second part is adrenaline, the usage for which we experienced earlier in the alley with the three thugs and the woman. Adrenaline is a constantly charging resource and can be used to great effect when you find yourself in a bind during battle. We’re only shown it being used offensively (the decapitation in the alley and here with another gruesome kill in the lawyer’s office), but it may also have other uses. They never really found time to clarify in the heat of battle.</p>
<p>Back to the mission, though, Corvo uses a power called blink which allows him to teleport to places ahead of him and does so to get from the upper levels of the mansion where the lawyer is down to the streets where he can make an escape. Unfortunately, a siren has sounded and guards begin to descend upon our hero.</p>
<p>Using some more powers and some gunplay, he eventually makes it through a portion of the guards and the courtyard to his escape point, but soon comes to a slightly more open but still hostile dock area that really makes me feel like we’re in Half-Life 2’s <a title="Locations of Half-Life - Wikipedia, the free encyclopedia" href="http://en.wikipedia.org/wiki/Locations_of_Half-Life#City_17">City 17</a>. This feeling is soon reinforced as two large Tallboys—giant bipedal robots—come into view and begin attacking. He eventually takes them and a couple additional guards down after some ingenious usage of combined powers and weapons and the demo ends.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/08/Dishonored_Tallboys.jpg"><img class="aligncenter size-large wp-image-179" title="Dishonored - Tallboys" src="http://timothypoon.com/blog/wp-content/uploads/2011/08/Dishonored_Tallboys-1024x576.jpg" alt="" width="100%" /></a>In the following Q&amp;A, the developers point out some elements that were easy to miss or dismiss without knowing what they were. At some point during the demo inside the mansion, they had picked up a rune and some blueprints. Runes are collected and spent to upgrade and unlock new powers. More powerful abilities cost more runes, so it falls on the player to decide if they would rather have a wide variety of powers or utilize only a select few exceptionally powerful skills.</p>
<p>For the non-supernatural upgrades for your weapons, you can use the money you earn and find as you complete missions. Weapons will have their own upgrade tree where stats and abilities become more powerful and unlocked as you progress further down the tech tree.</p>
<p>Someone then asks about the nature of your uniqueness in the world of Dunwall. Smith and Colantonio confirm that there are indeed other supernatural characters in the game (such as the mysteriously named Outsider), but they are kept very secretive from the rest of the world. Most people are completely unaware that there even is such a thing as real magic. In fact, at some point during Corvo’s escape from the courtyard of the mansion, an enemy yells out “aggh! Witchcraft!” at the sight of you performing a wind blast.</p>
<p>Next comes up a question of how free players are to explore the world. As the designer for Deus Ex, Smith is all for exploration in every sense of the word. There is nothing truly off limits from the player as, if you want, you can attempt to get anywhere you can see including rooftops, sewers, or what have you. This continues into the usage of powers, too, as they all combine nicely through both design and happenstance.</p>
<p>During play testing, they discovered that players were combining powers in unexpected ways, like using the super jump and the blink abilities to quickly scale buildings that would otherwise prove too difficult or impossible to climb. Other players discovered that they could easily stealth into hidden paths by summoning a rat swarm, possessing one, and climbing through a gutter. A few more hostile testers even discovered that you could attach bombs to these rats before you possess them so you could hand deliver a deadly explosion to a batch of enemies before fully engaging in combat.</p>
<p>Next came up the topic of the game’s structure. While you do have a home base you return to between missions, there will be “absolutely no open world” as each mission (and thus environment and its accompanying predicament) is “handcrafted” to the story and the context of your plot progression. They are very much impressing the fact that while the flow of the game is open to the player and reactive to your actions, scenarios within missions are specially established beforehand to really fit the zeitgeist of the world of Dunwall and your place within its history. This, consequently, means that there will be absolutely no multiplayer in Dishonored.</p>
<p>After having heard so little about Dishonored and yet enough for me to feel like I wasn’t going to entirely like where it was headed, after this demo, I feel excited. You can definitely feel where the pedigree of its designers came from (Deus Ex, <a title="Arx Fatalis - Wikipedia, the free encyclopedia" href="http://en.wikipedia.org/wiki/Arx_Fatalis">Arx Fatalis</a>) and also where the influences came from (Thief, BioShock, Half-Life), but none of it feels overly done. Certainly elements here and there are very reminiscent of those games in sometimes vague, sometimes specific ways, but there’s a certain cohesive feeling to it. So far, it seems that they took all the good parts of those games, left out the bad, and are attempting to make an altogether new and impressive game. Expect Dishonored on your PC, PS3, or 360 sometime in early summer of 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://timothypoon.com/blog/2011/08/10/quakecon-dishonored-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QuakeCon RAGE Demo</title>
		<link>http://timothypoon.com/blog/2011/08/09/quakecon-rage-demo/</link>
		<comments>http://timothypoon.com/blog/2011/08/09/quakecon-rage-demo/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 20:58:29 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Video Games]]></category>
		<category><![CDATA[id Software]]></category>
		<category><![CDATA[previews]]></category>
		<category><![CDATA[QuakeCon]]></category>
		<category><![CDATA[Rage]]></category>

		<guid isPermaLink="false">http://timothypoon.com/blog/?p=165</guid>
		<description><![CDATA[Judging by everyone I talked to at QuakeCon, I was not alone in almost wholeheartedly writing off id Software&#8216;s upcoming post-apocalyptic first-person shooter Rage. Also judging by everyone I talked to at QuakeCon, I am now not alone in feeling like a damn fool for having done so. Rage is very much an id game [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/08/RAGE-box-cropped.jpg"><img class="aligncenter size-full wp-image-166" title="RAGE" src="http://timothypoon.com/blog/wp-content/uploads/2011/08/RAGE-box-cropped.jpg" alt="" width="100%" /></a>Judging by everyone I talked to at <a title="QuakeCon 2011 | August 4-7, 2011 @ Hilton Anatole, Dallas, TX" href="http://www.quakecon.org/">QuakeCon</a>, I was not alone in almost wholeheartedly writing off <a title="id Software" href="http://www.idsoftware.com/">id Software</a>&#8216;s upcoming post-apocalyptic first-person shooter <a title="RAGE Official Site" href="http://rage.com/">Rage</a>. Also judging by everyone I talked to at QuakeCon, I am now not alone in feeling like a damn fool for having done so.</p>
<p>Rage is very much an id game when you look at it in the grand scheme of things. It&#8217;s certainly hard to quantify why I say that (though it&#8217;s also a sentiment <a title="QuakeCon 2011 - John Carmack Keynote - YouTube" href="http://www.youtube.com/watch?v=4zgYG-_ha28">John Carmack shared in his keynote</a> this year), but you definitely get that sensation. Perhaps it&#8217;s the quick movement, or certain &#8220;kitchen sink&#8221; design choices that harkens to shooters of old, but it&#8217;s definitely hard to miss.</p>
<p>It says something that after spending three hours with the game last Friday, though, that I still can&#8217;t nail down what made the demo stand out so much. Yes, Rage is yet another post-apocalyptic shooter; yes, Rage is very brown; and yes to a dozen other things that you may have niggling doubts about over the game, but trust me, the sum is (thus far) much greater than its individual parts.</p>
<p>This preview will contain some specific information from the game, including spoilers.  Consider yourself warned.</p>
<p>The demo opens with a rather striking cinematic. Despite being very sparse in the narrative department, you can get the whole story, and even experience a tinge of emotion, as the exceptional orchestral music awakens something very dramatic deep inside of you. In short, the world is ending. <a title="99942 Apophis - Wikipedia, the free encyclopedia" href="http://en.wikipedia.org/wiki/99942_Apophis">99942 Apophis</a> is a very real and very large asteroid that has a one in 250,000 chance of colliding with Earth on April 13, 2036, but in the world of Rage, Apophis hits Earth in the most spectacularly catastrophic of ways on August 23, 2038, and it&#8217;s all downhill from there.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/08/shot00764.jpg"><img class="aligncenter size-large wp-image-167" title="RAGE screenshot" src="http://timothypoon.com/blog/wp-content/uploads/2011/08/shot00764-1024x640.jpg" alt="" width="100%" /></a>You play as the silent protagonist who turns out to be one of (if not the only) survivor of the Ark, a specially built housing chamber for those selected to carry on the human legacy. On both sides of the fortune spectrum, however, you are not alone. Following your awakening from your presumably long sleep, you stumble out into the Wasteland and are almost immediately attacked by a mutant, a moment that actually almost had me jump out of my seat. Fortunately for you, a non-Ark survivor named Dan Hagar (played by John Goodman) comes to your rescue and takes you away to Hagar Settlement, your first safe haven from the numerous hostiles he points out to you as you ride in his buggy.</p>
<p>The drive is pretty lengthy, so I get to looking around the world a fair bit, and it is gorgeous. True to many things Carmack said during his keynote/rant, it does look like a &#8220;moving painting,&#8221; and the expansive landscapes are rather impressive. Also true to his words, things get…&#8221;muddy&#8221; upon closer inspection. This is due to the <a title="MegaTexture - Wikipedia, the free encyclopedia" href="http://en.wikipedia.org/wiki/MegaTexture">MegaTexture</a> (called Virtual Texturing with Rage and Doom 4&#8242;s advancements) technology&#8217;s limitation on how it wraps 4096&#215;4096 pages of textures across all models and sprites, opting for impressive vistas and improved RAM usage over minute details and more easily created textures.</p>
<p>Hagar says a lot of things during the drive and upon your arrival at his settlement, but some key parts stand out: 1) you, like other Ark survivors, are special, 2) there is something called the Authority that seems to rule much of the world, and 3) it&#8217;s dangerous out there.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/08/shot00730.jpg"><img class="aligncenter size-large wp-image-168" title="RAGE screenshot" src="http://timothypoon.com/blog/wp-content/uploads/2011/08/shot00730-1024x640.jpg" alt="" width="100%" /></a>Throughout the demo, a lot of other characters and factions (and there seem to be a fair number of those hanging around) talk about the Authority. They track down and reward others who bring in Ark survivors, something Hagar mentions when he points out that your Ark suit is going to draw a lot of attention, but not much more is known about them. They might be experimenting on mutants, and they might also be attempting some martial law, but I never found out for sure what was true and what wasn&#8217;t.</p>
<p>It seems though that they, and many others, are looking for Ark survivors because of their &#8220;specialness,&#8221; the degree of which you begin to discover on your first mission for Dan Hagar. He loads you up with a pistol and a loaner ATV, and tells you to clear out the mutants that might have seen you two kill their buddies during your rescue.</p>
<p>The ATV handles pretty nicely. At first I felt like it was a bit sluggish with extremely tight handling, but there is a boost button and, boy howdy, do you haul ass with that boost. There&#8217;s a nice zoom out effect when you speed up, giving you that extra sense of seriously trucking across the terrain. It almost feels like the ATV handles analogously to the player in that you can change speeds and directions fairly quickly. When you hit the hand brake, you stop. <em>Hard</em>.</p>
<p>And for the record, if you hit something hard enough, you will go flying and probably die.</p>
<p>Upon reaching the enemy hideout, you start clearing them out. The pistol you are given is weak, fires slowly and, honestly, gave me almost immediate doubt as to whether or not id had already lost my interest in this game. But, I pressed on.</p>
<p>I should mention at this point, though, that I encountered a few bugs that involved enemies shooting through solid walls, and getting stuck on geometry, but those are fairly minor. I have total confidence those are simply affectations of being a preview build.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/08/shot00684.jpg"><img class="aligncenter size-large wp-image-169" title="RAGE screenshot" src="http://timothypoon.com/blog/wp-content/uploads/2011/08/shot00684-1024x640.jpg" alt="" width="100%" /></a>Eventually the mutants captured me and sent me to the &#8220;kill room.&#8221; Lo and behold, they actually did kill me, but here is where you get your first taste of being a special Ark survivor; all Ark survivors have nanotechnology floating around inside of them, and in this particular case, you can revive yourself when you die. It occurs through a little minigame where you have to match the analog sticks (I was playing on Xbox 360, though a PS3 and PC build were also available) with what is shown on screen and simultaneously pull both triggers. If I had to compare it something I&#8217;ve never actually done but imagine being somewhat similar in sensation, it&#8217;s kind of like using a defibrillator. Depending on how you manage the final defibrillation, you get some portion of your health back and cause an explosion of sorts that knocks down—if not kills—all of the nearby enemies.</p>
<p>Supposedly, there will be other Ark powers to discover, but that was the only one I was given in my time with the game.</p>
<p>While it seems that it was a predetermined action that you are captured by the mutants, it wouldn&#8217;t have surprised me if they were just sneaky enough to pull it off regardless. Once they catch sight of you, the mutants will immediately start running towards you, and bounding off the walls and ceiling to avoid your fire. It actually gets quite tense. At some point I was backed all the way into a corner, and at the last second managed to pop my pursuer in the noggin.</p>
<p>Of course, I could have also used my melee attack, which turns out to be fairly powerful. Once I got the feel for the game, I started capping runners in the knee and then using a melee to finish them off. This is not a criticism for being yet another FPS where the melee is an instant kill, last ditch effort sort of attack but rather how well the game plays. Things move fluidly and quickly enough to where I can shoot a runner or two in the leg, unload a couple more rounds in those behind cover with guns, and then come back to finish those on the ground before they recover. It all feels amazingly satisfying.</p>
<p>It gets even better once you ditch the useless pistol. Or rather, once you ditch the useless pistol <em>ammo</em>. Some weapons have multiple ammo types, and the pistol upgrades to fat rounds that turn it more into a traditional magnum-class revolver, rather than a starter handgun. It usually killed enemies in one shot, though that particular ammo was somewhat scarce. Of course, there were also the crossbow, sniper rifle, assault rifle, shotgun, and a bladed boomerang to use.</p>
<p>The boomerang was earned through a shooting gallery minigame with Hagar&#8217;s daughter, and it was hardly the last side game I encountered in Rage. There is also a whole bunch of racing, car combat with buggy upgrades to boot, collectible cards which in turn become its own game, and more. Now you know why I said it had a &#8220;kitchen sink&#8221; sort of feel to it.</p>
<p>I guess that&#8217;s why Rage actually kind of reminds me of <a title="Borderlands" href="http://www.borderlandsthegame.com/borderlands.html">Borderlands</a>. It&#8217;s not just the art style (though I&#8217;m sure that has something to do with it), but rather how the game is tied together. You chat people up in the open world environment, they tell you to go places and what they&#8217;ll give you upon your return, and then you shoot someone, collect something, or flip a switch. When you&#8217;re not doing that, there are plenty of job boards hanging around where you can pick up and complete different side quests, such as the one that continually rewards you for killing bandits in particular areas of the map. There&#8217;s also a battle arena that is very much <a title="Borderlands: Max Moxxi's Underdome Riot" href="http://www.borderlandsthegame.com/madmoxxi/home.html">Mad Moxxi</a>.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/08/shot00777.jpg"><img class="aligncenter size-large wp-image-170" title="RAGE screenshot" src="http://timothypoon.com/blog/wp-content/uploads/2011/08/shot00777-1024x640.jpg" alt="" width="100%" /></a>Unfortunately, the vehicles are pretty subpar compared to Borderlands&#8217; or any other game&#8217;s vehicles. Aside from the ATV, for some reason the rest of the whip sets all handle in an excessively floaty fashion. If you go any faster than walking speed, you instantly lose any semblance of turning radius and traction. This isn&#8217;t a problem on some of the early race tracks, where they are wide and the turns are soft, but when you&#8217;re combating multiple bandit vehicles, or attempting to finesse around Hagar&#8217;s garage, it definitely gets a bit annoying.</p>
<p>However, that&#8217;s really all I can put on my cons list after three hours with Rage. Given that I&#8217;ve really only explored a small fraction of the game, I can&#8217;t say for sure if it stays that engaging or fun or varied the whole time, but I can definitely say I liked those three hours a whole lot. Like, a lot a lot.</p>
]]></content:encoded>
			<wfw:commentRss>http://timothypoon.com/blog/2011/08/09/quakecon-rage-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Infamous 2 Review</title>
		<link>http://timothypoon.com/blog/2011/06/21/infamous-2-review/</link>
		<comments>http://timothypoon.com/blog/2011/06/21/infamous-2-review/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 19:01:31 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Video Games]]></category>
		<category><![CDATA[inFAMOUS 2]]></category>
		<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://timothypoon.com/blog/?p=150</guid>
		<description><![CDATA[If you watch the Giant Bomb Quick Look of Infamous 2 or listen to their 6/14/2011 Bombcast, you&#8217;ll hear them talk about Infamous in comparison with other modern triple-A third-person action games. To make a two-hour story short, Uncharted and Assassin&#8217;s Creed both had moderate or tepid initial offerings in their franchises (though I still [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/06/1444378-i2_logo.jpg"><img class="aligncenter size-large wp-image-151" title="inFAMOUS 2" src="http://timothypoon.com/blog/wp-content/uploads/2011/06/1444378-i2_logo-1024x624.jpg" alt="" width="100%" /></a>If you watch the <a title="GiantBomb.com ~ Video Game Reviews, News, Videos &amp; Forums - Giant Bomb" href="http://www.giantbomb.com/">Giant Bomb</a> <a title="Quick Look: Infamous 2 - Giant Bomb" href="http://www.giantbomb.com/quick-look-infamous-2/17-4386/">Quick Look of Infamous 2</a> or listen to their <a title="Bombcast - Giant Bomb's Gaming Podcast" href="http://www.giantbomb.com/podcast/?podcast_id=236">6/14/2011 Bombcast</a>, you&#8217;ll hear them talk about <a title="inFAMOUS 2 - The Official Site" href="http://www.infamousthegame.com/">Infamous</a> in comparison with other modern triple-A third-person action games. To make a two-hour story short, Uncharted and Assassin&#8217;s Creed both had moderate or tepid initial offerings in their franchises (though I still think fondly of them both), but their sophomoric attempts were universally praised not just as relative improvements but also as game of the year contenders/winners.</p>
<p>So then what about Infamous? Well, it&#8217;s generally accepted that Infamous was a great game on its own. From the traversal to the story, it was just a moderately polished, very fun, fairly engaging game despite some niggling problems—chief among them the lackluster impact of moral choices and unfortunate difficulty spikes. How, then, can Infamous 2 hope to make the same critical leap in quality as Uncharted 2 and Assassin&#8217;s Creed II?</p>
<p>Honestly, it can&#8217;t. I&#8217;d rather not use this now cliché video game review phrase, but it sums up Infamous 2 so perfectly: &#8220;evolutionary, but not revolutionary.&#8221; Almost everything across the board is improved over the first Infamous, but nothing is exceedingly impressive or so drastically different that you just go &#8220;wow, I&#8217;m so glad I was able to experience that.&#8221;</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/06/1697940-5407181453_8c73f7467f_o.jpg"><img class="aligncenter size-large wp-image-152" title="inFAMOUS 2" src="http://timothypoon.com/blog/wp-content/uploads/2011/06/1697940-5407181453_8c73f7467f_o-1024x576.jpg" alt="" width="100%" /></a>At its core, Infamous is still about traversing a massive open world environment, and despite how ridiculously fun it was in the first one (as it was easily the best part), Infamous 2 has managed to surpass all expectations. First and foremost, there are now electric rails on the sides of buildings leading up towards the roof so all you have to do is jump on and you&#8217;ll soon be on sky-high.</p>
<p>This is in addition to some choice powers that have been included in the game. A purely good karmic reward, Cole can get an ice launch that, when coupled with the improved static thrusters (which actually lift and speed you up when activated), make it so you might as well be flying. The ice launch is such an incredible game changer that the mere notion of playing the evil side of the story and giving up that power made me weep. This is in stark contrast with the first Infamous where you had to wait about a third of the way through the game to get just the thrusters, whereas now you have the new kickass thrusters, crucial ice launch, and a lightning tether, but I didn&#8217;t really get much use of that since you had to aim and line stuff up with its limited range while the ice launch simply required you to hit R2 and proceed to lay pipe.</p>
<p>And even though the ice launch power is more than enough reason to go good the first time around in Infamous 2, Sucker Punch actually addressed one of my main complaints with the first game in that good karmic powers were categorically worse than the evil karmic powers. This time around, your good/ice powers are just as powerful (if not as much fun since you still have to worry about collateral damage, i.e. killing citizens).</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/06/1697942-5407181737_42594d7bf4_o.jpg"><img class="aligncenter size-large wp-image-153" title="inFAMOUS 2" src="http://timothypoon.com/blog/wp-content/uploads/2011/06/1697942-5407181737_42594d7bf4_o-1024x576.jpg" alt="" width="100%" /></a>However, the morale choices in Infamous 2 are still not all that great. It basically boils down to whether or not you kill citizens while you kill bad guys and pressing L2 or R2 at certain points in the game. It seems so contrived that when the game stopped and prompted me to press a button, a little part of me actually died inside and made me feel like taking the disc out and throwing it out the window. This lack of nuance is amplified by the fact that the good and evil embodiments in Kuo and Nix are so in-your-face it hurts. At the very least, the endings are different enough to where I felt like my choices mattered (more so than the first game where it felt like I was just watching the same cutscene over again with some different voice-over).</p>
<p>Speaking of which, the voice acting is&#8230;good? I mean, in general, I thought the actual voice actors were great and totally convinced me that these people knew what they were doing with that microphone. However, the <a title="Why inFamous got a new Cole (and why he was changed back) | Joystiq" href="http://www.joystiq.com/2010/08/26/why-infamous-got-a-new-cole-and-why-he-was-changed-back/">new Cole McGrath</a> is a total abomination in my mind. I eventually got over the new face the same way I eventually got over the fact that they <a title="Maggie Gyllenhaal Cast in The Dark Knight | /Film" href="http://www.slashfilm.com/maggie-gyllenhaal-cast-in-the-dark-knight/">replaced Katie Holmes in The Dark Knight</a>, but the voice was such a botched move. I understand the goal was to get a new actor who could convincingly do both good and evil in voice and action, but the new Cole sounds—no offense to <a title="inFAMOUS 2 | Eric Ladin" href="http://www.ericladin.com/category/infamous-2/">Eric Ladin</a>—like a shady drug dealer, albeit a very well voice-acted one. I will say, however, that I actually liked Zeke this time around. He was a total 180, much like Rico in Killzone 3 (well, bad example, but still).</p>
<p>Zeke&#8217;s eventual pivotal reveal in the plot, however, was not so great (or that surprising, to be honest). In fact, the greatest issue I had with the story was that it never really had me gripped like the first Infamous did. In that game, I was always wondering in the back of my mind who is Kessler, why did I have that bomb, where are these powers coming from, etc., but in Infamous 2, the closest I got to wondering anything was where did the Beast come from. However, after 30 or so missions and no real hint of an answer, I stopped caring even though the actual answer ended up being kind of cool. Even the last karmic choice was kind of a letdown as moments before the mission (entitled &#8220;The Final Choice&#8221;), I said to myself &#8220;oh man, I hope they don&#8217;t&#8230;&#8221; and then they did. That&#8217;s just how superhero stories go, though, I guess; the origin story is always easier than the follow-up.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/06/1800614-i18.jpg"><img class="aligncenter size-large wp-image-154" title="inFAMOUS 2" src="http://timothypoon.com/blog/wp-content/uploads/2011/06/1800614-i18-1024x576.jpg" alt="" width="100%" /></a>There are not just 30 missions, though, if that&#8217;s what you&#8217;re worried about. No, there are about 10 more story missions, 60 side quests, and an infinite supply of Red Dead Redemption-style random quickies. Then, when you account for the dead drops and blast shards, this is actually quite a sizable game. I don&#8217;t recall the actual amount of time I spent on the game, but I&#8217;d say on medium difficulty and collecting everything, I got about 16 or 17 hours out of it. Going through again on hard and on the opposite karmic spectrum will probably double it.</p>
<p>You could, theoretically, squeeze an infinite amount of value out of Infamous 2 with its <a title="inFAMOUS 2: Behemoth, UGC Detailed in Sucker Punch Videos- PlayStation Blog" href="http://blog.us.playstation.com/2011/04/11/infamous-2-behemoth-forced-conduits-user-generated-content-revealed-at-sucker-punch-studio-tour/">UGC stuff</a>. Users can create/play/share levels with a set of tools similar to those that Sucker Punch used to make their own story missions. The tools themselves are fairly easy to use and extremely robust—though not to the extent of LittleBigPlanet—but I just don&#8217;t see the draw. After 34 hours of playing through the game twice (or even once at 17 hours), do you really want more Infamous 2? If your answer is in the affirmative, then by all means, go for it, but despite how much I appreciate the addition and its refinement, it&#8217;s just not for me.</p>
<p>It&#8217;s odd, then, that some aspects of the game almost completely lack any sort of polish whatsoever. Sound design, for example: where is it? Whenever you purchase a new power, everything shakes and vibrates and the screens whites out a bit, but no sound? Not even controller vibration? And then when you stand in the middle of the city, there is absolutely <em>no</em> ambient sound. On a New Orleans-esque party square with a railcar and dozens of pedestrians meandering, it&#8217;s not right that I can hear Cole&#8217;s footsteps. Coming from L.A. Noire, it&#8217;s incredibly disappointing to come to an open world that feels as lifeless as New Marais (though it looks absolutely gorgeous).</p>
<p>That&#8217;s all the new stuff, but what about those &#8220;niggling problems&#8221; I brought up before? Well, they&#8217;re still there, just less of them. While the jump-on-the-vehicle-and-shoot-stuff missions are no longer a pain in the ass, there are still notable difficulty spikes in the game, especially when dealing with defense missions. They were never so difficult I wanted to quit, but they did make me feel cheated. Perhaps it has to do with the fact that it is an open world game and there will always be a certain amount of jank involved, but those deaths never felt justified. They were always at the hands of non-mission enemies coming in and amping up the numbers or one of those enemies that just bull rush you and shoot you off a roof into a pile of other baddies who continue to ravage your body with bullets as you struggle to finish your stun animation.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/06/1766603-7.jpg"><img class="aligncenter size-large wp-image-155" title="inFAMOUS 2" src="http://timothypoon.com/blog/wp-content/uploads/2011/06/1766603-7-1024x576.jpg" alt="" width="100%" /></a>And remember <a title="YouTube - InFamous 2: Behemoth Gameplay Trailer [HD]" href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=L5X8VcrloAY#t=125s">that trailer</a> that showed Cole fending off huge enemies and having amazing, cinematic battles with them? Well, true enough, those enemies are in there, but the battles are far from amazing or cinematic. To avoid being cheated and killed by being pinned against a wall or trampled or crushed by falling debris, these battles tend to take place from afar with potshots from your rocket or grenade abilities. Even when fought in an unrelenting manner, these battles still get to the point of tedium and bored me after the second or third encounter. By the time you fight your sixth ice titan, your eyes will just glaze over and roll into the back of your head as you sigh and mash away at the triangle button.</p>
<p>Truthfully, there&#8217;s nothing all that wrong with Infamous 2; it is, in fact, a very good game. The hits it takes in the story are more than made up for by the improved gameplay which, at the time I was playing the first Infamous, seemed nigh, uh, <em>unimprovable</em>. However, I really had no intentions to play this game in spite of my love for Sucker Punch and the first Infamous until a price drop, but when a free copy found its way into my hands, who was I to say no? In the end, I was glad I played it, but an Uncharted 2 or Assassin&#8217;s Creed II it is not.</p>
<p><strong>Final Grade: B</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://timothypoon.com/blog/2011/06/21/infamous-2-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Portal 2 Review</title>
		<link>http://timothypoon.com/blog/2011/05/10/portal-2-review/</link>
		<comments>http://timothypoon.com/blog/2011/05/10/portal-2-review/#comments</comments>
		<pubDate>Tue, 10 May 2011 21:17:49 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Video Games]]></category>
		<category><![CDATA[Portal 2]]></category>
		<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://timothypoon.com/blog/?p=141</guid>
		<description><![CDATA[I think I was disappointed with Portal 2, but not in a bad way (nor am I entirely sure it&#8217;s 100% accurate to say &#8220;disappointed&#8221;). I know this doesn&#8217;t make a whole lot of sense, but just go with it for a second. The first Portal was a wholly revelatory experience, a quality that can [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/05/1768247-portal2__1_.jpg"><img class="aligncenter size-large wp-image-143" title="Portal 2" src="http://timothypoon.com/blog/wp-content/uploads/2011/05/1768247-portal2__1_-1024x640.jpg" alt="" width="100%" /></a>I think I was disappointed with <a href="http://www.thinkwithportals.com/">Portal 2</a>, but not in a bad way (nor am I entirely sure it&#8217;s 100% accurate to say &#8220;disappointed&#8221;). I know this doesn&#8217;t make a whole lot of sense, but just go with it for a second.</p>
<p>The <a href="http://orange.half-life2.com/portal.html">first Portal</a> was a wholly revelatory experience, a quality that can be at least partially attributed to the fact that not much was known about it when it came out. As far as anyone knew, it was just a puzzle game that happened to be in the first-person perspective. Little did I and everyone else know that we were in for a surprise; the game had <em>depth</em>. It had a story, it had humor, and it had some truly awe-inspiring gameplay.</p>
<p>There have been games with time and space bending elements in it before, but Portal made it feel real. <a href="http://www.aperturescience.com/">Aperture Science</a> and its Handheld Portal Device may not actually exist, but the physics governing the movement and whatnot of the game felt immediately and absolutely right, so that&#8217;s not the issue with Portal 2.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/05/1769460-portal2_2011_04_26_18_23_14_31.png"><img class="aligncenter size-large wp-image-144" title="Portal 2" src="http://timothypoon.com/blog/wp-content/uploads/2011/05/1769460-portal2_2011_04_26_18_23_14_31-1024x576.png" alt="" width="100%" /></a>The issue is that everything else I loved from the first Portal has been&#8230;diminished. Not through time or lack of polish but because it&#8217;s quite literally impossible to experience what I and everyone else experienced their first time through Portal. You don&#8217;t hit that &#8220;oh god, GLaDOS is crazy&#8221; moment or discovering the infinite-fall-to-launch combo for the first time. Instead, you hit that &#8220;yep, GLaDOS is still crazy&#8221; moment and discover that the infinite-fall-to-launch combo still works.</p>
<p>That&#8217;s just a problem with every sequel, I guess, though Portal 2 doesn&#8217;t succumb to much of any other sequelitis symptoms. The story is, once again, surprisingly compelling and <a href="http://www.giantbomb.com/the-turrets-of-portal-2/17-3968/">funny</a> and urges you to discover more of the world. If you haven&#8217;t read the <a href="http://www.thinkwithportals.com/comic/">Portal 2 web comics</a>, I suggest you do that immediately regardless of whether or not you&#8217;ve played the game. You&#8217;ll want to know more, trust me.</p>
<p>And there are new gameplay elements that are actually <em>new</em>. The gels are pretty fun and occasionally require some out-of-the-box thinking, though truthfully, if you get exceptionally lazy, you could just douse the entire level in every kind of gel and you&#8217;ll probably be almost done. In fact, the white moon powder gel was the worst offender of the scorched Earth tactic in that once you can get a portal on one wall with the gel, you can get them anywhere and solving a puzzle becomes completely and totally trivial.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/05/1768365-portal2__95_.jpg"><img class="aligncenter size-large wp-image-145" title="Portal 2" src="http://timothypoon.com/blog/wp-content/uploads/2011/05/1768365-portal2__95_-1024x640.jpg" alt="" width="100%" /></a>What I really enjoyed were the Hard Light Bridges. My first encounter with them had me questioning myself a fair bit (&#8220;is this right? Is this allowed?&#8221;), but once I realized that yes, you <em>can</em> do that and that <em>is</em> pretty cool, I was won over by the seemingly simplistic obstacle.</p>
<p>The only problem is that the puzzles seemed a bit easier. Perhaps it&#8217;s because this time around I&#8217;m familiar with some of the portal puzzle tropes, but there weren&#8217;t many exploratory puzzle solving sequences such as the ones I found in the first Portal. Everything was along the lines of &#8220;okay, everything is decrepit&#8230;that thing is rotting&#8230;oh wait! That wall is white, let&#8217;s shoot that&#8221; and you were usually well on your way to solving the puzzle.</p>
<p>It&#8217;s a sufficiently long game, too. Some people may complain, but I got a good six or so hours out of it and all six were pretty much sublime. And once you include the four hours of co-op, the value just rockets up. It once again becomes the argument of would you rather have 30+ hours of mediocre content or a scant 10 hours of ridiculously amazing content, but I think you&#8217;ve already sussed out my stance on the subject.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/05/1779081-portal2_2011_04_28_21_26_36_28.png"><img class="aligncenter size-large wp-image-146" title="Portal 2" src="http://timothypoon.com/blog/wp-content/uploads/2011/05/1779081-portal2_2011_04_28_21_26_36_28-1024x576.png" alt="" width="100%" /></a>Speaking of the co-op, color me impressed. Thinking with two portals is pretty simple, but once you introduce a second set of (disconnected) portals, things get rough. At some points, I thought my partner and I would just be stumped forever. However, it usually turns out our impasse was the result of playing at 4am after a full day of dicking around, but coming back the next day and solving the puzzle still felt immensely satisfying. There is one in particular that involves some simultaneous acrobatics. If you&#8217;ve played, you know which one I&#8217;m talking about. If you haven&#8217;t, I can&#8217;t wait until you get through it yourself.</p>
<p>Not only that, but the co-op actually requires cooperation. If you and your partner don&#8217;t work together, you&#8217;re dead in the water. Poor communication or lack of willingness to allow each other to explore possibilities will result in an absolute deadlock.</p>
<p>The only problem is that since I played the co-op splitscreen, I encountered an unfortunate issue regarding stuttering. Maybe it&#8217;s only with splitscreen, maybe it&#8217;s only on PS3, but there were numerous occasions of abhorrently slogging framerate, and not just while the action was super intense. Even during loading screens or when you&#8217;re just walking down a hallway, there were cases when the game just stopped for about .2 seconds or so. It wasn&#8217;t even my particular PS3 that was the cause as I also played with a different disc on a different PS3 and encountered the same stuttering.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/05/1765257-portal2_2011_04_21_20_28_23_37_.png"><img class="aligncenter size-large wp-image-148" title="Portal 2" src="http://timothypoon.com/blog/wp-content/uploads/2011/05/1765257-portal2_2011_04_21_20_28_23_37_-1024x576.png" alt="" width="100%" /></a>However, being that some purely co-op framerate issues are my only qualms with the game, it&#8217;s hard to say I found Portal 2 lackluster, but here we are. It&#8217;s not that there aren&#8217;t great moments because there totally are: seeing turrets being made, encountering my first, um, <em>less-than-potent</em> turrets, and the ending where you [REDACTED] the [REDACTED] and totally [REDACTED] all over the [REDACTED]. After all that, it&#8217;s hard to say I was disappointed, but living up to my times with the first Portal have proven to be impossible.</p>
<p>(Here&#8217;s a <a href="http://www.giantbomb.com/podcast/?podcast_id=224">spoilercast</a> from Giant Bomb where Ryan Davis sits down with Valve&#8217;s Jay Pinkerton, Erik Wolpaw, and Chet Faliszek where they talk indepth about some of the things in Portal 2 that may have left you wanting. Also, <a href="http://spaaaaaaaaaaaaaaaaaaaaaaaccee.com/">SPAAAAAAAAACE</a> (don&#8217;t click if you haven&#8217;t beaten the game))</p>
<p><strong>Final Grade: A+</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://timothypoon.com/blog/2011/05/10/portal-2-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AJAX Uploading with HTML5&#8242;s File API</title>
		<link>http://timothypoon.com/blog/2011/05/10/ajax-uploading-with-html5s-file-api/</link>
		<comments>http://timothypoon.com/blog/2011/05/10/ajax-uploading-with-html5s-file-api/#comments</comments>
		<pubDate>Tue, 10 May 2011 15:30:32 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[File API]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://timothypoon.com/blog/?p=134</guid>
		<description><![CDATA[Prior to HTML5 and its File API, getting media from a user was a somewhat sordid affair. You generally either had a static page with an &#60;input&#62; element of a &#60;form&#62; posting to a processing file or utilized some third party script that relied on a Flash bridge or &#60;iframe&#62; shenanigans to asynchronously get the [...]]]></description>
			<content:encoded><![CDATA[<p>Prior to HTML5 and its <a href="http://dev.w3.org/2006/webapi/FileAPI/">File API</a>, getting media from a user was a somewhat sordid affair. You generally either had a static page with an &lt;input&gt; element of a &lt;form&gt; posting to a processing file or utilized some third party script that relied on a <a href="http://www.uploadify.com/">Flash bridge</a> or <a href="http://www.openjs.com/articles/ajax/ajax_file_upload/">&lt;iframe&gt; shenanigans</a> to asynchronously get the file where it needed to go.</p>
<p>This leads to things like <a href="http://html5demos.com/file-api">this demo</a> and how you can <a href="http://gmailblog.blogspot.com/2010/04/drag-and-drop-attachments-onto-messages.html">drag &#8216;n drop (&#8216;n upload)</a> files with Gmail. Seeing as how I was tired of doing the aforementioned Flash or &lt;iframe&gt; bullhonky, I decided it was time to get the ball rolling for myself.</p>
<h2>Accessing the Files</h2>
<p>It&#8217;s actually surprisingly simple to see what a user has chosen to upload in a &lt;input&gt; (of a file type, of course). You can access all of the vital pieces of information through JavaScript once they&#8217;ve been selected, and I say &#8220;they&#8221; because if you specify the <strong>multiple</strong> attribute in the &lt;input&gt;, you can then select multiple items:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'file-input-element'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">onchange</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">files</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">files</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">files</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<span style="color: #006600; font-style: italic;">/**<br />
&nbsp;* name - file name<br />
&nbsp;* size - file size in bytes<br />
&nbsp;* type - file MIME type<br />
**/</span></div></td></tr></tbody></table></div>
<p>Aside from the attributes, there are also some pretty sweet functions like <em>getAsDataURL()</em> and <em>getAsText()</em> which can have some cool uses (such as dynamically loading an image as a CSS background image in data form), but we&#8217;ll have to save that for another day. All we need right now is access to that files array.</p>
<h2>Uploading the Files</h2>
<p>It starts pretty much the same as any other AJAX data transfer, which is with a <strong>XMLHttpRequest</strong> object. The only difference is that since usually everything I do is with a GET request, I just put any key-value pairs in the URL and access the information server side. However, since the file data may (and probably will) exceed the <a href="http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url/417184#417184">URI size limit</a>, it&#8217;s best to go with POST.</p>
<p>So then you may be asking &#8220;how do we get the files to go along with the XHR request?&#8221; It&#8217;s actually quite simple: just use a <a href="http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-formdata-interface"><strong>FormData</strong> object</a>.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> xhr <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> XMLHttpRequest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
xhr.<span style="color: #660066;">upload</span>.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'progress'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>ev<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>ev.<span style="color: #660066;">loaded</span><span style="color: #339933;">/</span>ev.<span style="color: #660066;">total</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'%'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
xhr.<span style="color: #660066;">onreadystatechange</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>ev<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Blah blah blah, you know how to make AJAX requests</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
xhr.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'POST'</span><span style="color: #339933;">,</span> url<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> files <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'file-input-element'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">files</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> data <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> FormData<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> files.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> data.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'file'</span><span style="color: #339933;">+</span>i<span style="color: #339933;">,</span> files<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
xhr.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>You might be wondering why not just use the <a href="http://www.w3.org/TR/FileAPI/#dfn-filereader">FileReader interface</a> and upload with something pre-built like the <a href="http://api.jquery.com/jQuery.ajax/">jQuery $.ajax()</a> method, and you&#8217;ll find the answer in the progress event listener; the $.ajax() method and the like doesn&#8217;t allow for it and I really want to display an upload progress bar, dammit!</p>
<h2>Is that it?</h2>
<p>Yeah, that&#8217;s it. Pretty easy, right? On the server side, the files are accessed just as if they were uploaded via a form and POSTed (in PHP&#8217;s case, they&#8217;re located all in the $_FILES array). I bundled it all up in a nice little JavaScript object which you can find over at <a href="https://github.com/mockenoff/HTML5-AJAX-File-Uploader">my GitHub</a> complete with options and some helpful methods. Have fun with it and be sure to leave a comment if you think of something I could/should change.</p>
<p><a href="http://timothypoon.com/blog/demos/ajax-file-api/" title="HTML5 AJAX File Uploader">View the demo</a> (requires an HTML5-capable browser). I hacked together my own version of a &lt;progress&gt; element since at the time of this writing, only WebKit browsers have it sufficiently implemented (though I can&#8217;t seem to figure out why it doesn&#8217;t fully function as expected in Opera).</p>
]]></content:encoded>
			<wfw:commentRss>http://timothypoon.com/blog/2011/05/10/ajax-uploading-with-html5s-file-api/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HTML5 Video Player For WebKit</title>
		<link>http://timothypoon.com/blog/2011/04/20/html5-video-player-for-webkit/</link>
		<comments>http://timothypoon.com/blog/2011/04/20/html5-video-player-for-webkit/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 17:22:38 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://timothypoon.com/blog/?p=123</guid>
		<description><![CDATA[I had to play some videos in Chrome recently, but the player had to be custom for the project. Rather than tinker with some pre-made solutions out there, I instead decided to do this myself and see what I could accomplish (disclaimer: I&#8217;ve actually written something like this a few times before, but I never [...]]]></description>
			<content:encoded><![CDATA[<p>I had to play some videos in Chrome recently, but the player had to be custom for the project. Rather than tinker with some <a href="http://videojs.com/" refl="no-follow">pre</a>-<a href="http://sublimevideo.net/" rel="no-follow">made</a> <a href="http://www.html5video.org/" rel="no-follow">solutions</a> out there, I instead decided to do this myself and see what I could accomplish (disclaimer: I&#8217;ve actually written something like this a few times before, but I never got around to writing about it).</p>
<h2>Looking Good</h2>
<p>The end goal was to achieve something that looks like this (in a modal overlay):</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/04/video-player-1.png"><img src="http://timothypoon.com/blog/wp-content/uploads/2011/04/video-player-1.png" alt="" title="HTML5 Video Player For WebKit" width="100%" class="aligncenter size-full wp-image-124" /></a></p>
<p>The main challenge I could see would be the progress bar. Being that I only had WebKit browsers with which to concern myself, my first instinct was to use the <a href="http://www.whatwg.org/specs/web-apps/current-work/#the-progress-element">&lt;progress&gt; element</a>. However, is it possible to style this element with CSS?</p>
<p>Absolutely sort of! As long as you&#8217;re using a WebKit browser, it turns out that you can use the vendor-specific selector pseudo element <em>::-webkit-progress-bar-value</em> (<a href="http://stackoverflow.com/questions/5016011/is-there-any-possibility-to-color-the-html5-progress-tag/5020891#5020891">relevant Stack Overflow post</a>) to style the value portion of the element in addition to the actual element itself. I&#8217;m sure the other engines will follow suit eventually, but it&#8217;s just WebKit for now.</p>
<p>Here&#8217;s the HTML structure I ended up with:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-player-wrapper&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-player&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;video&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;source <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/video.ogv&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'video/ogg; codecs=&quot;theora, vorbis&quot;'</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>video&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-player-bar&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/button.html"><span style="color: #000000; font-weight: bold;">button</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-player-play&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/button.html"><span style="color: #000000; font-weight: bold;">button</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-player-timer&quot;</span>&gt;</span>0.00<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;progress <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-player-seek&quot;</span>&gt;</span>0.00<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>progress&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-player-duration&quot;</span>&gt;</span>0.00<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-player-knob&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-player-skip&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>As a side note, I put an .ogv video file in there just to remind you that they are the preferred format for HTML5 videos. In my experience, other formats such as .mp4 will occasionally freeze Chrome and probably make you sad. I&#8217;ve encountered some issues with .webm, too, while .ogv and .m4v have yet to halt my browser.</p>
<p>Here&#8217;s the CSS to make things look like they should:</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br />111<br />112<br />113<br />114<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.video-player-wrapper</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">9999</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>.85<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; -webkit-user-select<span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #6666ff;">.video-player-wrapper</span> <span style="color: #6666ff;">.video-player-skip</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666ff;">.video-player-wrapper</span> <span style="color: #6666ff;">.video-player-skip</span><span style="color: #00AA00;">:</span><span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">'x'</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
<span style="color: #6666ff;">.video-player</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #6666ff;">.video-player-bar</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">65px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:-webkit-linear-</span>gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">,</span>rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>.7<span style="color: #00AA00;">&#41;</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">,</span>rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>.7<span style="color: #00AA00;">&#41;</span> <span style="color: #933;">95px</span><span style="color: #00AA00;">,</span><span style="color: #993333;">transparent</span> <span style="color: #933;">95px</span><span style="color: #00AA00;">,</span><span style="color: #993333;">transparent</span> <span style="color: #933;">98px</span><span style="color: #00AA00;">,</span>rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>.7<span style="color: #00AA00;">&#41;</span> <span style="color: #933;">98px</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; -webkit-transition<span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">bottom</span> .4s ease-in<span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #6666ff;">.video-player-bar</span>.<span style="color: #993333;">hide</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">-65px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #6666ff;">.video-player-knob</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">22px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">44px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">44px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">46px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">161px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; opacity<span style="color: #00AA00;">:</span>.6<span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-box-shadow<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>.8<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-transition<span style="color: #3333ff;">:opacity </span>.4s ease-in<span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666ff;">.video-player-knob</span><span style="color: #00AA00;">:</span><span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">''</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">16px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">-16px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">21px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666ff;">.video-player-bar</span>.<span style="color: #993333;">hide</span> <span style="color: #6666ff;">.video-player-knob</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #6666ff;">.video-player-bar</span> <span style="color: #6666ff;">.video-player-play</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span>inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">95px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-box-sizing<span style="color: #3333ff;">:border-</span>box<span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">16px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666ff;">.video-player-bar</span> <span style="color: #6666ff;">.video-player-play</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.video-player-bar</span> <span style="color: #6666ff;">.video-player-play</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">''</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span>inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666ff;">.video-player-bar</span> <span style="color: #6666ff;">.video-player-play</span><span style="color: #6666ff;">.play</span><span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-color</span><span style="color: #00AA00;">:</span><span style="color: #993333;">transparent</span> <span style="color: #993333;">transparent</span> <span style="color: #993333;">transparent</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">9px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666ff;">.video-player-bar</span> <span style="color: #6666ff;">.video-player-play</span>.<span style="color: #000000; font-weight: bold;">pause</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.video-player-bar</span> <span style="color: #6666ff;">.video-player-play</span>.<span style="color: #000000; font-weight: bold;">pause</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">24px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #933;">3px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #6666ff;">.video-player-bar</span> span <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">21px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">50px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">23px</span> <span style="color: #933;">11px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">11px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span>inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">4px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>.8<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span><br />
<span style="color: #6666ff;">.video-player-bar</span> <span style="color: #6666ff;">.video-player-seek</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">31px</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; -webkit-appearance<span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #6666ff;">.video-player-bar</span> <span style="color: #6666ff;">.video-player-seek</span><span style="color: #00AA00;">:</span><span style="color: #3333ff;">:-webkit-progress-bar-value </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:-webkit-linear-</span>gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#37d0ff</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#35addb</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>You&#8217;ll notice all the special CSS3 things like box shadows and gradients are WebKit-specific. Other vendor prefixes for Mozilla and Opera (and the CSS3 standard) can be added if necessary.</p>
<h2>The jQuery Magic</h2>
<p>Although not written as a jQuery plug-in (which will probably happen at some point down the line), this puppy <em>does</em> use it to make things easier on the JavaScript side of things.</p>
<p>First is to set up the videoPlayer object. This includes extending user options with the defaults, instantiating the object status variables, and creating and adding the new DOM elements:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> $this <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">settings</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>autoOpen<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> autoPlay<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> autoClose<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> controlTimeout<span style="color: #339933;">:</span><span style="color: #CC0000;">3500</span><span style="color: #339933;">,</span> skip<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> $this.<span style="color: #000066;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #000066;">close</span><span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #000066;">open</span><span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
$.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">settings</span><span style="color: #339933;">,</span> options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">opened</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">htimer</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">seeking</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">control</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000066; font-weight: bold;">this</span>.$elem <span style="color: #339933;">=</span> $elem.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'pointer-events'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'none'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">video</span> <span style="color: #339933;">=</span> $elem.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.$play <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;button class=&quot;video-player-play pause&quot;&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.$time <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;span class=&quot;video-player-timer&quot;&gt;0.00&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.$seek <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;progress class=&quot;video-player-seek&quot; value=&quot;0&quot; max=&quot;0&quot;&gt;0%&lt;/progress&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.$maxt <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;span class=&quot;video-player-duration&quot;&gt;0.00&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.$ctrl <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;div class=&quot;video-player-bar hide&quot;&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.$knob <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;a class=&quot;video-player-knob&quot;&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.$skip <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;a class=&quot;video-player-skip&quot;&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.$skin <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;div class=&quot;video-player&quot;&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span>$elem.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span>$elem.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>$elem<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>$this.$ctrl.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>$this.$play<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>$this.$time<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>$this.$seek<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>$this.$maxt<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>$this.$knob<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.$wrap <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;div class=&quot;video-player-wrapper&quot;&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'none'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.$skin<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.$skip<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Most of the methods like <em>play()</em> and <em>pause()</em> are pretty self-explanatory, but <em>setTime()</em> and <em>setPosition()</em> are somewhat complex:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">setTime</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>time<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; time <span style="color: #339933;">=</span> parseFloat<span style="color: #009900;">&#40;</span>time<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> vduration <span style="color: #339933;">=</span> parseFloat<span style="color: #009900;">&#40;</span>$this.$elem.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'duration'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>time <span style="color: #339933;">&gt;</span> vduration<span style="color: #009900;">&#41;</span> time <span style="color: #339933;">=</span> vduration<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>time <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> time <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; $this.$elem.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'currentTime'</span><span style="color: #339933;">,</span>time<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; $this.$time.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>$this.<span style="color: #660066;">formatTime</span><span style="color: #009900;">&#40;</span>time<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; $this.$seek.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span>time<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>time <span style="color: #339933;">/</span> vduration<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; $this.$knob.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#40;</span>$this.$seek.<span style="color: #660066;">offset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">left</span> <span style="color: #339933;">-</span> $this.$skin.<span style="color: #660066;">offset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">left</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>$this.$seek.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>time <span style="color: #009966; font-style: italic;">/ vduration)) - ($this.$knob.width() /</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">setPosition</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>pageX<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; $this.<span style="color: #660066;">setTime</span><span style="color: #009900;">&#40;</span>parseFloat<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>pageX <span style="color: #339933;">-</span> $this.$seek.<span style="color: #660066;">offset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">left</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> $this.$seek.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> parseFloat<span style="color: #009900;">&#40;</span>$this.$elem.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'duration'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p><em>setPosition()</em> takes an x-position of the page and converts it to a time within the range of the video&#8217;s duration. If the x-position is to the left of the seek bar, the time is set to zero. If the x-position is to the right of the seek bar, the time is set to the video&#8217;s duration (and subsequently will stop). If the x-position is within the left and right x-positions of the seek bar, then we take its position ratio against the video&#8217;s duration and uses <em>setTime()</em> to set the place in the video playback.</p>
<p>One other thing that might jump out at you is the <em>createSeek()</em>:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">// Things don't really start until the video is ready, i.e. video.readyState == true</span><br />
<span style="color: #003366; font-weight: bold;">var</span> createSeek <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$this.$elem.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'readyState'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> updateTime <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>ev<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>$this.<span style="color: #660066;">seeking</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this.<span style="color: #660066;">setTime</span><span style="color: #009900;">&#40;</span>$this.$elem.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'currentTime'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$this.$elem.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'currentTime'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;=</span> $this.$elem.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'duration'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$this.<span style="color: #660066;">settings</span>.<span style="color: #660066;">autoClose</span><span style="color: #009900;">&#41;</span> $this.<span style="color: #000066;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; $this.$seek.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'max'</span><span style="color: #339933;">,</span> $this.$elem.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'duration'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; $this.$maxt.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>$this.<span style="color: #660066;">formatTime</span><span style="color: #009900;">&#40;</span>$this.$elem.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'duration'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; $this.$elem.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'timeupdate'</span><span style="color: #339933;">,</span> updateTime<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$this.<span style="color: #660066;">settings</span>.<span style="color: #660066;">autoOpen</span><span style="color: #009900;">&#41;</span> $this.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; updateTime<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; setTimeout<span style="color: #009900;">&#40;</span>createSeek<span style="color: #339933;">,</span> <span style="color: #CC0000;">150</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
createSeek<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>This function isn&#8217;t called ever again (or at least shouldn&#8217;t be) and is truly only used for object instantiation. You have to wait for the video DOM element to return a <strong>readyState</strong> attribute so you know the video is loaded and ready to play. Otherwise, you just set a timeout to keep checking the <strong>readyState</strong> until the video is ready so you can apply the <em>updateTime()</em> function to the <strong>timeupdate</strong> event of the video.</p>
<p>Lastly, there&#8217;s just a little bit of fun geometry. It moves the skip/close button to the very upper-right corner of the video player.</p>
<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/04/video-player-2.png"><img src="http://timothypoon.com/blog/wp-content/uploads/2011/04/video-player-2.png" alt="" title="Position the video player&#039;s close button" width="100%" class="aligncenter size-full wp-image-125" /></a></p>
<p>This is done by finding the distance from the center of the element to one of its corners (its a square in the DOM even though it renders as a circle), subtracting the radius of the circle (which is also half the width of the square), and using the resulting value as the hypotenuse of an isosceles right triangle whose other sides are used as offsets from the top right corner of the video player.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">// Move the skip/close button to the very top right corner of the player</span><br />
<span style="color: #003366; font-weight: bold;">var</span> w <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.$skip.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; n <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">sqrt</span><span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">pow</span><span style="color: #009900;">&#40;</span>w<span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> Math.<span style="color: #660066;">pow</span><span style="color: #009900;">&#40;</span>w<span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009966; font-style: italic;">/ 2) - (w /</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; o <span style="color: #339933;">=</span> Math.<span style="color: #660066;">sqrt</span><span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">pow</span><span style="color: #009900;">&#40;</span>n<span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">this</span>.$skip.<span style="color: #660066;">offset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>left<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span>parseInt<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.$skin.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>.$skin.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> o<span style="color: #339933;">,</span> top<span style="color: #339933;">:</span>parseInt<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.$skin.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #000066; font-weight: bold;">this</span>.$skip.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> o<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<h2>In Conclusion</h2>
<p>That&#8217;s that! If you want to read about how to use it, check out <a href="https://github.com/mockenoff/HTML5-Video-Player">my GitHub for this particular little doodad</a>. There are still a few things left to do, or at least things I&#8217;d like to eventually get around to doing since in its current state, this guy does exactly what I need it to do.</p>
<ul>
<li>Add volume controls &ndash; it&#8217;s simple enough. It works almost like the seek bar except it controls the volume.</li>
<li>Turn into a jQuery plug-in &ndash; it currently relies on jQuery, so I should probably make it a jQuery plug-in instead of calling it as a new object (that, or just get rid of the dependency).</li>
<li>Improved seek controls &ndash; if you jump around too fast, the events fire out of order and the video will go back to its pre-seek position after mouse release. Currently, you can avoid this by going a bit slower or by moving the mouse slightly either direction before releasing.</li>
<li>Expand to other HTML5 browsers &ndash; currently only supports WebKit browsers even though &lt;video&gt; elements belong to HTML5 in general, so it would make sense to make this plug-in do the same.</li>
</ul>
<p><a href="http://timothypoon.com/blog/demos/video-player/" title="HTML5 Video Player Demo">View the demo</a> (requires a WebKit browser). Video is from <a href="http://disney.go.com/disneynature/oceans/" rel="no-follow"><em>Oceans</em></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://timothypoon.com/blog/2011/04/20/html5-video-player-for-webkit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Killzone 3 Review</title>
		<link>http://timothypoon.com/blog/2011/03/18/killzone-3-review/</link>
		<comments>http://timothypoon.com/blog/2011/03/18/killzone-3-review/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 16:10:11 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Video Games]]></category>
		<category><![CDATA[Killzone 3]]></category>
		<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://timothypoon.com/blog/?p=99</guid>
		<description><![CDATA[Truth be told, I finished playing Killzone 3 about two days after release, and I do mean finished; I haven&#8217;t played it again since then. It&#8217;s not a terribly difficult game if you&#8217;re not on Elite difficulty nor a notably lengthy one coming in at a shade under eight hours, but I also didn&#8217;t get [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://timothypoon.com/blog/wp-content/uploads/2011/03/killzone3-6.jpg"><img class="aligncenter size-large wp-image-101" title="Killzone 3" src="http://timothypoon.com/blog/wp-content/uploads/2011/03/killzone3-6-1024x576.jpg" alt="" width="100%" /></a></p>
<p>Truth be told, I finished playing <a title="Killzone - Home page" href="http://www.killzone.com/kz3/en_US/home.html">Killzone 3</a> about two days after release, and I do mean <em>finished</em>; I haven&#8217;t played it again since then. It&#8217;s not a terribly difficult game if you&#8217;re not on Elite difficulty nor a notably lengthy one coming in at a shade under eight hours, but I also didn&#8217;t get hooked into the multiplayer like I did in Killzone 2. For all its faults and highlights and almost a month of reflection, I still can&#8217;t tell if this fourth installment of the franchise (don&#8217;t forget <a title="Killzone: Liberation (video game)" href="http://www.giantbomb.com/killzone-liberation/61-5556/">Killzone: Liberation</a>) is better, worse, or just $60 of the same thing from 2009.</p>
<p>The campaign starts out rather strong. In fact, despite having to do the usual &#8220;head to the firing zone&#8221; gun tutorial, I was immediately hooked. You immediately step out into what is apparently a Helghan base of operations (also, ostensibly, as a Helghast soldier yourself), and your eyes are immediately flooded with colors. You vision is almost overwhelmed with painting-esque visuals and your mind is atwitter trying to work out why you&#8217;re a Helghast soldier all of a sudden. I mean, it&#8217;s not like it&#8217;s an <a title="YouTube - Inception Trailer 2" href="http://www.youtube.com/watch?v=66TuSJo4dZM">intricately constructed mystery</a> of how things will unfold, but it&#8217;s definitely a nice start.</p>
<p>This continues for a good while (the quality of the game, I mean). You jump right into some nice gunfights and are immediately treated to some nice battle areas and sizable enemies to gun down with a detachable turret. I even had some fun in the first true turret sequence as you mow down enemy vehicles and minor encampments with rockets and lead.</p>
<div id="attachment_102" class="wp-caption alignleft" style="width: 310px"><a href="http://timothypoon.com/blog/wp-content/uploads/2011/03/killzone3-9.jpg"><img class="size-medium wp-image-102" title="Killzone 3" src="http://timothypoon.com/blog/wp-content/uploads/2011/03/killzone3-9-300x168.jpg" alt="" width="300" height="168" /></a><p class="wp-caption-text">Get ready to do a lot of this</p></div>
<p>Unfortunately, it never progresses much further than that. As far as Killzone 3 is concerned, turret sequences are the pinnacle of game design. If I recall correctly (which may be a problem considering it&#8217;s been almost a month since I last played), there were about seven or eight turret sequences, and that doesn&#8217;t include the fact that the entire final battle of the game is three on-rails turret sequences <em>back to back</em>. I actually felt kind of cheated in the end, especially considering the ending was rather lackluster and 95% of my deaths in the campaign came from the very last turret battle.</p>
<p>There&#8217;s something about the core gameplay that irks me as well. It&#8217;s not the movement or the aiming (which is drastically improved over Killzone 2 even <a title="Killzone 2 patch adds 'high precision' controls- Destructoid" href="http://www.destructoid.com/killzone-2-patch-adds-high-precision-controls-133678.phtml">post-patch</a>) or even how the guns feel as you unload countless shots into sometimes seemingly endless bullet sponges in Helghan military attire, but just <em>something</em> doesn&#8217;t play quite right. Perhaps it&#8217;s the almost-sticky cover mechanic that carries over from Killzone 2 and still feels just as stupid whenever you find yourself kneeling behind a piece of cover barely tall enough to cover your kneecaps, but I&#8217;m not sure.</p>
<div id="attachment_103" class="wp-caption alignright" style="width: 310px"><a href="http://timothypoon.com/blog/wp-content/uploads/2011/03/killzone3-1.jpg"><img class="size-medium wp-image-103" title="Killzone 3" src="http://timothypoon.com/blog/wp-content/uploads/2011/03/killzone3-1-300x168.jpg" alt="" width="300" height="168" /></a><p class="wp-caption-text">Warning: beautiful game ahead</p></div>
<p>It&#8217;s not all bad, though. I usually reserve this word for <a title="Horse Art and Equine Paintings by Elin Pendleton, AAEA, WAOW and ISAP" href="http://www.equinepaintings.com/">paintings of horses</a> or <a title="Flickr: The Breakfast Bliss Pool" href="http://www.flickr.com/groups/breakfastbliss/pool/">pictures of breakfast foods</a> or when describing <a title="Kristen Bell - IMDb" href="http://www.imdb.com/name/nm0068338/">Kristen Bell</a>, but this game is <em>beautiful</em>. Especially once you find yourself messing around the &#8220;jungle&#8221; of planet Helghan (which unfortunately houses a seemingly endless stealth sequence), the bright and varied colors of this alien world make you truly almost weep Crayola-branded tears. There&#8217;s also just so much going on in the background almost constantly. If not actual stuff like people milling about or robots assembling, uh, other robots, then you definitely get to see firsthand how far Guerrilla&#8217;s burning ember particle technology has advanced (hint: it&#8217;s <em>a lot</em>).</p>
<p>You should know, though, that I didn&#8217;t play Killzone 3 in 3D considering I don&#8217;t have a 3D TV nor do I want to encourage the 3D trend in gaming.</p>
<p>The only knock on the visuals is that animations are sometimes&#8230;odd. It&#8217;s as if an enemy or ally AI wants to go a predetermined distance but can&#8217;t quite decide whether or not to go with his running or his walking animation and whether to make it as stiff as an old man&#8217;s joints on a rainy day, but there are definitely cases when you see these issues. This may just be an affectation of the game&#8217;s AI issues in general, though, as you will regularly go down in battle literally <strong>RIGHT NEXT</strong> to your AI partner only to hear him say &#8220;I can&#8217;t reach you!&#8221;</p>
<div id="attachment_105" class="wp-caption alignleft" style="width: 310px"><a href="http://timothypoon.com/blog/wp-content/uploads/2011/03/killzone3-4.jpg"><img class="size-medium wp-image-105" title="Killzone 3" src="http://timothypoon.com/blog/wp-content/uploads/2011/03/killzone3-4-300x168.jpg" alt="" width="300" height="168" /></a><p class="wp-caption-text">Malcolm McDowell rules</p></div>
<p>Voice acting is also a showcase. Although the stars really shine through with <a title="Malcolm McDowell - IMDb" href="http://www.imdb.com/name/nm0000532/">Malcolm McDowell</a> as Jorhan Stahl and <a title="Ray Winstone - IMDb" href="http://www.imdb.com/name/nm0935653/">Ray Winstone</a> as Admiral Orlock, everyone performs rather well. It doesn&#8217;t quite make up for Rico being a dick for 10 hours in Killzone 2 or the humdrum, poorly paced, occasionally nonsensical story of Killzone 3 (I mean, the revisit of the opening stage later on in the game is <em>totally and inexplicably</em> different from the first time you went through it), but it&#8217;s definitely worth noting how good the voice acting is.</p>
<p>The multiplayer is also what I&#8217;d consider a positive. I&#8217;m not much of an online multiplayer sort of guy, but Killzone 2 really got me hooked for some reason. Killzone 3 does the same for me for the most part, but I think that can be largely attributed to the way games are played. In Warzone games, you&#8217;ll find yourself completing objective after objective with no downtime (read: map loads or game resets) until one team has achieved a certain number of mission wins. With this structure, you can find yourself unwittingly playing for hours on end when you originally told yourself &#8220;all right, just a couple quick matches.&#8221;</p>
<p>You can of course still get your jollies the old fashioned way with &#8220;Guerrilla Warfare,&#8221; which is just Killzone 3&#8242;s way of saying team deathmatch, but you&#8217;ll also notice that much of Killzone 2&#8242;s openness to user configuration is gone. You can&#8217;t restrict game types in Warzone or configure player classes or even create a god damn match. You pretty much just choose a preset class loadout, hit find a match, and get on your way. There&#8217;s definitely something to be said about simplicity, but this isn&#8217;t a case where everyone will agree with it.</p>
<div id="attachment_106" class="wp-caption aligncenter" style="width: 520px"><a href="http://timothypoon.com/blog/wp-content/uploads/2011/03/killzone3-3.jpg"><img class="size-large wp-image-106" title="Killzone 3" src="http://timothypoon.com/blog/wp-content/uploads/2011/03/killzone3-3-1024x576.jpg" alt="" width="98%" /></a><p class="wp-caption-text">Brutal, but sometimes in a good way</p></div>
<p>It may sound like I&#8217;ve been overtly negative on Killzone 3 to the point where I don&#8217;t like it, but that&#8217;s not entirely true. I guess I just had rather high expectations going into it. I figure Killzone 2 was way better than Killzone, so the third major release has to be better than the second one too, right? Wrong. If anything, I would say it&#8217;s just marginally improved in ways you would expect Madden to improve each year, which isn&#8217;t a bad thing. If you were coming off a pedigree of Killzone 2 and simply met its level of quality as well, you would have no reason not to be pleased with yourself. I guess I just wanted to more, but Killzone 3 couldn&#8217;t provide.</p>
<p><strong>Final Grade: B</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://timothypoon.com/blog/2011/03/18/killzone-3-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

