Mostly a bugfix release.
See the Dogwatch Games blog post for details:
Mostly a bugfix release.
See the Dogwatch Games blog post for details:
I’m pleased to announce the release of my new game Dead Valley.
It currently does not work on mobile devices, but that’s coming soon!
Here’s a video showing gameplay:
I’ll eventually write a post on the basics of how it works but for you buzzword compliant people here’s some of the HTML5 technologies I used: Web Audio, Canvas, Gradients, CSS 3D Transforms, Local Storage, Multiple CSS Backgrounds, CSS Opacity, and Web Workers.
If any of that made sense this may be of some use to you
set errorformat=%E\ \ %.%#Error:%m,%-G%.%#/jasmine.js:%.%#,%C\ %#at\ %.%#\ (%f:%l:%c)
We did the whole process; coming up with ideas and workshopping them, storyboards, animatics, audio and final production. It went too fast — I miss all the great people and energy.
Thanks Scott and Jennifer and all the students and staff for making it a great workshop!
When I released my HTML 5 Asteroids Clone last year it got a fair number of hits as the link was passed around the Twitters and random blog postings. Soon the hits dropped off and traffic normalized to slightly higher than before, still mostly from various blogs.
Lately I have been receiving some spikes in traffic directly to the HTML 5 Asteroids game almost all of which had no referrer. It was a puzzle — up till now most of my traffic had come from a specific source but these visitors were coming directly to my site, from a bookmark, or just typing in the URL.
At first I just shrugged it off, I figured some people had bookmarked the game and played it occasionally. Still the traffic kept coming, only abating on the weekends, and I couldn’t think I’d get that many hits from people casually playing from bookmarks. The WordPress stats package wasn’t giving me much beyond the plain quantity of traffic.
Finally I installed Google Analytics. I had never used it before but I figured it may give me more insight to where this traffic was coming from. It would at least tell me what kind of browser they were using.
So I waited a few days for it to pull some data in. This is what I saw:
Microsoft Engineers are using my HTML 5 Asteroids game to test IE 10′s new canvas element.
There isn’t much to say but: Awesome!
Welcome Microsoft Engineers! Thank you for playing my game!
I’ve added touch controls to the HTML 5 Asteroids game that will only appear when you’re running it on an iPad. The game will expand to fill the whole screen for maximum asteroid blasting action. Orient your iPad in landscape fashion!
There are a couple caveats (warning some nerdy content ahead):
On the iPad the game runs at around 22 frames per second at its peak, not nearly as good as around 40 on a laptop, though it is enough for gameplay even if it can get choppy at times when there’s a lot of stuff whizzing around.
Unfortunately I’m only testing for collisions when the objects are rendered so it’s quite possible with lower framerates to have a bullet flying out of your ship first get rendered on one side of the asteroid you’re trying to pulverize and in the next frame get rendered on the other side letting it sail undamaged into your ship. This is called the tunneling effect. This is not a problem on a laptop or desktop because the framerates are high. Since we’re sampling less per second (~22 verses ~40) a moving object is drawn less times though it’s traveling the same distance. In other words if an asteroid travels from the top of the screen to the bottom of the screen in one second, on your computer it will most likely get drawn 40 times during that trip and on an iPad it will get drawn only 22 times leaving larger gaps between the drawings. These larger gaps leave more of a chance for things to slip through and not collide when your eyes say they should have.
I’m considering augmenting the collision detection to remove the tunneling effect but it will need extra math which means slower framerates, at least initially. It might be a better use of my time to pump framerates up.
It drove me nuts trying to figure this out and I haven’t been able to work around it.
What this means for the game is that using two fingers at the same time will get frustrating fast as the control you’re holding down will stop working periodically. I suggest tapping for the best experience instead of holding.
Oh, this does not happen on the iPhone in case you were wondering, it works as expected! I have sent a bug report to apple (with a sample html page) and hopefully they already have a fix that’s not available yet or they will fix it for a future release.
On a side note, why aren’t Apple’s bug lists searchable by the public? They must get reams of dupes.
In any case, let me know how it works!
For some months I’ve been playing around with HTML 5′s Canvas element because I was curious about it, especially after seeing it run Flash. I hacked at it for a while then realized I had produced an Asteroids game.
The source code is up on GitHub!
The Canvas element is super cool. Basically all of the sprites in the game are simple paths defined by an array of points. These points are translated, rotated and scaled based on their state at any given point in the game using the standard Canvas transformations. Plus it gives it a nice retro feel.
Let me know what you think!
Here’s some cool links to things that helped me out with the game:
I think it went well considering we probably spent more time figuring out the background color scheme on our slides than preparing what we were going to say. I wasn’t worried, I’ve been using Vim for 15 years now so it was my favorite kind of speech: one where I felt completely at ease with the subject matter.
The slides probably will not be of any particular use to you since they’re rather sparse. We however added a bunch of links on the end to blogs/screencasts/cool sites we like as well as all of the plugins we mentioned during the talk.
So you don’t have to hunt through the slides here are those links in all their glory:
MacVim – http://code.google.com/p/macvim/
Screencasts on Vim – http://vimcasts.org/
Vim Tip a Day on Twitter – http://twitter.com/vimtips
Vim Recipies – http://vim.runpaint.org/toc/
The Rails Plugin – http://rails.vim.tpope.net/
BufExplorer – http://www.vim.org/scripts/script.php?script_id=42
NERDCommenter – http://www.vim.org/scripts/script.php?script_id=1218
NERDSnippets – http://github.com/scrooloose/nerdsnippets
RubySingleTest – http://www.vim.org/scripts/script.php?script_id=2869
I, like many developers, do my best to follow the practice of Test Driven Development (TDD). In practical terms this means you write a test to test your code before you write the code itself. This approach forces your mindset into having a clearer sense of how the code will be used since you’re writing code to use the code first. Got it? Increased test coverage also means more robust and maintainable code.
My first formal introduction to TDD was a three-day TDD workshop put on by Jim Weirich and Joe O’Brien while I was at the Los Angeles Times. Jim, an expert EMACS user, had his system setup to run tests quickly from within the editor, even showing a red or green notice indicating the pass/fail status of the test.
This may not seem like a big deal to people using any number of IDEs but personally, I’m a Vim user (specifically MacVim, it’s an extremely well done port of Vim using Cocoa). I love it. I’m way faster editing inside of Vim; my brain has mapped around all of the commands because I’ve been editing with it for so long. I’ve been using vi variants in one form or another since my Freshman year of college when my Computer Science 101 professor forced us all to code with it for our programming projects on the school’s Sun server. While doing Java work two or so years ago, I developed mostly on Eclipse and eventually broke down and purchased a license for the Eclipse vi keybinding plugin. Now that I’m employed for Ruby work I’ve switched back to Vim full-time (after a 1/2 hour dabbling with Textmate).
Jim’s EMACS setup made me jealous. During the class I figured out how to set the make program to use ruby (or spec for rspec tests) and Quickfix will run the tests for the file. Here’s the command:
:set makeprg=ruby\ %
The \ escapes the space and the % gets expanded to the current buffer’s filename when Quickfix is activated. Quickfix was originally used for a “quick” way of compiling your program to see if there’s any errors. Vim will even move your cursor to the file and line number of the first error if there are any. This works for ruby tests too! Another Vim setting, errorformat, is how Vim parses errors from running makeprg.
OK, so this is all great, but what if my test file is huge? What if it takes 10+ seconds to run? What if I’m only interested in a single test because I’m being a good developer and practicing TDD?
This is where the Ruby Single Test plugin comes in. The plugin is an extraction of some functions I’ve been playing with in my .vimrc file for the past couple of weeks. All it does is provide a command for running the test block your cursor is hovering over in your test file (<leader>. by default. <leader> is usually comma or backslash). Most of the time you’re only interested in a single test while you’re editing code so turn-around time is vastly improved. No more jumping back to the console to run a test.
To install just drop the ruby_single_test.vim file in your .vim/plugin directory.
Currently it works for Test::Unit as well as Rspec tests. I’ve been using this quite a bit recently and I think I’ve worked out most of the bugs. My setup isn’t necessarily the same any everyone’s so please let me know if you have any problems with it! The code is up on Github, so feel free to play with it.