frosty.tumblr.com

home archive rss

Thursday, October 20, 2011

Codify

I love the iPad. It’s casual, immediate, and more intimate than a laptop ever will be. There are wonderful apps available for most activities you could want to do on an iPad: reading, writing, drawing, listening, watching, playing; the list goes on. Much of the time when I want to perform some task (or just relax), I will now reach for my iPad instead of my laptop if possible. However, until now I have been unable to use the iPad for one of my favourite pasttimes: programming1.

Enter Codify. Codify is a new iPad app that lets you create simple games, prototypes and simulations directly on an iPad. You write code in the Lua language using a fantastic code editor (more on that later), with an API that’s very similar to Processing. You can then run that code straight away; play your game, experiment with your prototype, tweak your simulation. It’s fast, easy, impressive, and fun.

Codify's project selection screen

Running and debugging

When running your game, you can specify parameters (for example, a character’s speed or size) which show up as sliders in a debugging pane on the left hand side of the screen. You can then tweak those parameters as you play, and observe in real time the effect they have on the game. It’s very neat. You can also watch variables and print information out to a console. Games themselves run very smoothly (unless you write them badly, of course!) and look great. You can pause, resume, or reset your game state whenever you like. You can also flip back to your code with just one tap.

Running a project in Codify

Help and examples

The app comes with a whole heap of examples, from the basics of using the provided graphics functions to clones of games like Doodle Jump, Snake, and Pong (the latter I wrote myself). The code editor also comes with a nicely presented documentation viewer which provides excellent help on graphics functions, the Lua language itself, parameters, multitouch, sounds, using the iPad’s accelerometer, and more.

To see some of the Codify examples in action, check out the following YouTube videos:

The code editor

The code editor has clearly had a lot of thought and polish put into it. It has a lot of things you’d expect from an editor: syntax highlighting, line numbers, multiple files (with tabs to switch between them), and a function browser. But it also has a slew of features designed to ease the task of programming on a touchscreen device:

  • For methods that take a colour as a parameter (RGBA values, for example (255, 150, 99, 255)), you can simply tap on the parameter and a colour wheel appears in a popover allowing you to choose a colour with touch alone.
  • You can tap and hold on any number and slide your finger from left to right (or vice versa) to increment / decrement the number without typing.
  • A row of custom keys above the onscreen keyboard provides shortcuts for common tasks: tabbing, access to documentation, inserting symbols / punctuation, and more.
  • Codify includes support for displaying sprites (images) and comes bundled with a number of high quality sprite packs from Lost Garden. Similarly to selecting colour parameters, you can tap a sprite parameter and select your sprite from a nice popover without the need for any typing.

Selecting a colour in the Codify code editor

Check out my Flickr photo set for a couple more photos showing the Codify interface. I’ve also put together a quick YouTube video showing some of its functionality in action (embedded at the bottom of this post).

The Lua language was deliberately chosen for Codify because it has a rather ‘wordy’ syntax, which fits nicely with the iPad’s onscreen keyboard. It means less switching to the ‘symbols’ keyboard, and less frustration for the user. The Lua runtime is also extremely light, which helps keep things snappy.

An introduction to programming? - a brief aside

I think that Codify could shine as a tool for teaching programming. I’ve long lamented the apparent increase in difficulty for kids (and adults alike, I guess) to get started with programming these days. I began coding on a BBC B in BASIC. Back then, you turned your computer on and you were presented with a flashing prompt, into which you could just start typing your code. Commercial games weren’t too advanced, so it was entirely possible you could get at least close to making the sorts of things you played yourself.

These days, where do you start? If you have a Mac or Linux machine, chances are you have something like Ruby or Python built in, so that’s fairly easy to get going with. If you’re on Windows, you’re left to install something yourself. You’ll also likely have to install some kind of text editor and work out how to use a command prompt (not a bad thing to do at all, of course, but it’s another barrier to entry). And then you’ll have to find some kind of games or graphics libraries and learn how those work. And then you might be able to have a go at learning a language and making a simple game. It’s a lot to get through and a lot of opportunities for a newcomer to lose their enthusiasm.

We’re now finally starting to see some potential solutions emerging on the web. For example, Processing.js (a JavaScript port of Processing) and Sketchpad.cc (which lets you just start coding with Processing.js in your browser). Codify is very much like these solutions, but built specifically for iPad and a touch interface. From now on, somebody who wants to get started with simple programming and games may just be able to search the App Store for ‘programming’, install Codify, and have a go; perhaps starting off modifying some of the examples and observing the effects their changes have in real time. It may not be as easy to a newcomer as I’m imagining, but it sure seems a lot simpler to me than what we’ve had in recent years.

Wrap up

Codify was created by Simeon Nasilowski of Two Lives Left and will be launching on the App Store on Wednesday 26th October for £5.49 ($7.99), which I think is great value for everything it offers. It’s a high quality package that finally lets you code on the iPad, and it does so with style. I highly recommend checking it out if you enjoy programming or think you’d like to give it a go. I’d be really interested in seeing what you create with it!

I’ve also posted a video to YouTube showing some of Codify’s features in action:


  1. Okay, so there are one or two existing iPad coding apps. However, these a) don’t seem to be as well designed, and b) mainly only seem to let you produce text-based console output. Codify is intended for fast graphical prototyping, and seems to be streets ahead of the competition. 

Sunday, October 2, 2011

Daring Do! - Tutorials and Collisions

I’ve been busy again today spending time with family (it’s my birthday tomorrow!), but I found a bit of time this evening to do some work on Daring Do!.

I’m still struggling with implementing basic tilemap collision detection in Cocos2D, so I’ve spent most of the evening working my way through some tutorials and fiddling around with code. I’m still not really sure of the best way of doing things, but I now have something very basic working. You can run and jump around a level and land on solid objects, which is a start!

I think I’ve been very spoilt by the ease of doing collisions in Flixel (the framework I used to create the original Flash version of Daring Do!), which made it very easy. It might be worth spending the time reading through Flixel’s source code and implementing similar collision detection for Cocos2D. I’ll have a bit more of an experiment tomorrow and try and decide what’s the best approach to take.

The Plan

Throughout October, I’m planning to try and make significant progress on porting my Ludum Dare entry to the iPhone and iPad, and blog about my experiences1. I’d like to aim to release the game on the App Store by the end of the year; Christmas at the very latest, preferably earlier.

If you haven’t seen my entry yet, please take a look: Daring Do!. There’s also a mini-writeup I did of my experience taking part in the competition.

I’ve been very busy today visiting family back home so I haven’t had time to write a proper post - I’m afraid this will have to do! More tomorrow.


  1. Blogging throughout October idea thanks to @jonhurlock. Will post links to everyone else taking part as soon as I can. 

Wednesday, August 10, 2011

Start simply. Pick something, anything, and dwell on it for an hour. A half hour. Instead of reading twenty interesting, fascinating things in ten minutes, read just one. One long thing. Read a New Yorker article. Read the entire issue, spend hours doing it. I feel different when I do that. It may not be a sense of perfect serenity, but I feel strong, centered, in control of my own thoughts. When I flit around the net, checking Twitter, Facebook, and other little pots of nectar, I feel agitated, drunk, unsatisfied.

Randy Murray: You Are Not A Hummingbird

Don’t be a hummingbird.

Sunday, June 26, 2011

Superbrothers: Sword & Sworcery EP

Superbrothers: Sword & Sworcery EP logo

Superbrothers: Sword & Sworcery EP is an experience. It’s an audiovisual treat and, in my opinion, a wonderful example of games as art. I don’t think it would be too bold to describe S:S&S EP as iOS’s Shadow of the Colossus 1.

Superbrothers: Sword & Sworcery EP screenshot

S&S EP references elements of geek culture and video games of the past to create a unique experience that still manages to feel comfortably familiar at the same time. You play a lone warrior, out to destroy the Megatome (a book of unimaginable power) along with the ancient evil that haunts the legendary mountain of Mingi Taw. The Legend of Zelda series and Shadow of the Colossus stand out as two of the biggest influences, or at least two games against which it is easy to draw parallels. Like Zelda, S&S: EP’s mute lead character’s ultimate goal involves collecting three sacred triangles that together form the ‘Trigon Trifecta’. Like Colossus, there are references to mysterious in-game mythology, fights with ancient creatures (leaving the player feeling morally conflicted), and a main character who gets weaker as they continue their quest. The game features beautiful pixel art graphics, and an outstanding original score. It’s clear that a lot of love was poured into this game.

Speaking of the score: the soundtrack is fantastic, and an integral part of the game. It’s available to download from Bandcamp or iTunes and has even been released on vinyl. It’s one of the best game soundtracks I’ve ever heard; kind of a mix between folk and chiptunes and lots more besides. You can listen to most of it for free on Bandcamp, so give it a spin. However, I think it sounds all the better once you’ve experienced it in-game. Some of the pieces are perfectly written and timed to coincide with sections of the game, and so I think you get something extra out of them once you’ve experienced their corresponding visual accompaniments. The game’s main antagonist, the Deathless Spectre, evokes an actual feeling of panic whenever it materializes onscreen which I think is in no small part due to the music that coincides its appearance. Sword & Sworcery EP really deserves to be played wearing headphones.

Superbrothers: Sword & Sworcery EP screenshot

In fact, the whole game deserves your full attention when you play, as you’ll get far more out of it. The story unfolds in multiple chapters, like the acts of a play, even down to a triumphant musical cue and the literal closing of curtains when you finish an act. The story’s narrator appears at the end of an act to sum up what you’ve achieved and what is yet to come. The first act is rather short - something of an introduction to the rest of the game - and the narrator actually tells you to take a break once it’s over. It’s a nice way to spread the game out over multiple sittings and it frames the story really well. The presentation values are top notch, and whilst it may sound hyperbolic I do think S&S EP really is more of an experience than a traditional game.

As a touchscreen-controlled game designed for iOS devices, S:S&S EP succeeds brilliantly. It doesn’t attempt to crowbar ‘traditional’ controls into somewhere they don’t fit (no onscreen d-pads) instead you simply either touch and hold or double-tap wherever you want your character to move. You can also pinch to zoom and pan around the screen. It works wonderfully and feels effortless. The majority of the game takes place in landscape orientation, but for sword fights you must rotate the device into portrait to take out your sword and shield. This reveals two thumb buttons at the bottom of the screen: one for your sword, and one for your shield. It couldn’t get much simpler. It’s nice to see a developer who understands the strengths and weaknesses of a touch-based control system.

Superbrothers: Sword & Sworcery EP screenshot

Sword & Sworcery is without a doubt one of the best games on iOS. But more than that, it is one of my favourite games of all time. Unlike a lot of iOS titles, it’s not a throwaway arcade experience but an adventure that will stick with you long after you finish playing. It draws you in to its little world through beautiful pixel graphics, a stunning soundtrack, a believable world and characters, and slick presentation throughout. I highly recommend it. It’s available now on the iOS App Store as either a universal version for iPad & iPhone, or as a slightly cheaper iPhone-only version.


  1. Widely regarded as a work of art, and incredible experience, a masterpiece, etc. See Metacritic for reviews. 

Friday, June 17, 2011

I think the entire tale is summed up with the iWork suite of apps, where Apple states that with iWork and iCloud:

Documents you’ve written, presentations you’ve prepared, spreadsheets you’ve made — your iWork apps can store them in iCloud. Which means you can view and edit the same document, in its latest state, on all your devices. And since iCloud automatically updates any changes you make, you don’t even have to remember to save your work.

Don’t read the above from the mindset of the savvy geek that you are — read that and think of how it will change computing for your mom or grandparents.

I don’t know of a single other way to take a document I am working on with my iPad and jump to my Mac having the document up-to-date and the cursor in the same position without pressing an extra button — to me, that is magic. It’s magic because logically that is how everything should have always worked, but in reality it is how nothing works.

∞ Apple’s Magnum Opus

If they get it right, iCloud is going to be pretty fantastic for everybody who uses it. But perhaps especially for non-geeky types.

Sunday, May 15, 2011

The Nintendo 3DS

At the end of March, I picked up a Nintendo 3DS. I wasn’t initially sure whether to get one up at launch, but in the end I went for it. This post is an attempt to come to some conclusion regarding how I feel about the device, and why I bought one.

Hardware

The 3DS keeps the same form-factor as the original DS which shipped back in 2005, although it’s closer in shape and size to the DS Lite which followed in mid-2006. The DS Lite has been my favourite portable console since the day I got one, and I think it’s too early at this point to tell whether the 3DS will take its crown.

The console itself has a pretty solid feel and I like the finish on it. I picked up the ‘Cosmos Black’ model, which is ever-so-slightly metallic and has a gradual black-to-grey gradient. The weight and size of it are just fine to me; I don’t notice a difference between it and my DS Lite. However, I can’t help but feel that in general the 3DS feels a little rough around the edges (not literally; that paint job is silky-smooth) and to me looks a bit like prototype hardware. It has three different coloured body sections, several different textures, numerous joins and seams, six small holes dotted across the device (four of which might be for microphones, but they look messy), a large black block for the IR port (infra-red? Really? In 2011?), three hardware sliders (although one is a switch that just looks like a slider), and four indicator lights (one of which just illuminates the word ‘3D’ constantly, for no apparent reason, even when 3D is turned off). In short, it feels unrefined. I also think the dual cameras on the lid look ugly, but I have no suggestions for how they could’ve better hidden them.

Add to this the seemingly arbitrary repositioning (from their previous locations on the DS Lite) of key controls: the power on / off button, volume slider, and stylus are all in entirely different places which is jarring when you first switch over from using a DS Lite. I’m sure there are design constraints due to the layout of the internals which meant things had to be placed like this, but in particular the new stylus position is just plain bad. It sits at the back of the device next to the game cartridge, so it’s very hard to locate and remove without looking. On the DS Lite, the stylus just slotted into the side and was really easy to get to.

The battery life is also not good. Most quotes seem to be between 2.5 and 5 hours, with a ~3 hour charge time. Nintendo provide a nice charging cradle, however, which makes it super easy to charge the 3DS. You just drop it in and off it goes. No doubt this is partially due to the 3D screen technology, the fact there are two screens to illuminate, and the wifi radio, but the battery life is rather disappointing when we have tiny devices like the iPhone 4 whose batteries last forever (even when playing games). It’s already affected me a few times, where I’ve taken out the DS to play on (having left it ‘asleep’ and with charge left) only to find it totally drained. I hope Nintendo can improve on this in the future.

I feel at this point like I’m being overly harsh. The 3DS does have some nice hardware additions and improvements over the previous version, which it would be remiss of me not to mention.

  • There’s an SD card slot built in for storing images, music, and game data, and the console actually comes supplied with a 2GB card (not bad at all, when most consumer electronics devices that use SD cards come with totally useless ones).
  • The stylus is metal and extendable. It feels much nicer than the old plastic one.
  • The 3DS is the first of Nintendo’s portable consoles to come with with an analogue control stick, and it’s fantastic. It’s actually more of a pad than a stick, and it slides around as you push it, rather than tilting. It’s compact and feels great to use.
  • The screens have had a resolution boost, but in my opinion not enough. I think my main criticism of the old DS was simply how terribly low resolution the screens were - text and graphics just didn’t look at all crisp and the whole thing felt very dated1. Perhaps I’m just spoilt by the incredible screen of the iPhone 4, but the 3DS still feels blocky and behind the curve. It’s likely that the somewhat low resolution is a tradeoff on account of the 3D display (which is in actual fact 800 pixels wide, but only 400 are visible to each eye). I think it’s probably acceptable that Nintendo sacrificed resolution for their new-fangled no-glasses 3D tech (if that’s indeed the tradeoff they had to make).
  • Last but not least, the actual graphics hardware inside has gotten a significant boost. This manifests itself mainly through software, so I’ll discuss it more in that section of the review. Needless to say, though, 3D graphics (as in computer-generated 3D, not stereoscopic 3D) are streets ahead of the old DS.

The 3DS feels more like an entirely new device that just happens to share a form-factor with its predecessor than a simple hardware revision. Despite its shortcomings, I think the 3DS hardware feels much less like a toy than previous versions. However, the DS Lite felt much more refined. Perhaps this is simply a symptom of this being the first generation of 3DS. Knowing Nintendo, there’ll be numerous revisions of the hardware in the future.

That 3D thing

So, the 3D, then. I mean, that’s what this whole thing’s about right? It is called the 3DS after all.

I’d like to preface this section by laying out my opinion on some similar technologies, so you know where I’m coming from as I discuss the 3D aspect of the 3DS.

  • I don’t like 3D films. In a minority of places I think it adds something - Pixar do it pretty well as it’s used subtley to give the film extra depth, and Avatar actually felt a bit more immersive in 3D. However, I really dislike having to wear what are essentially sunglasses over the top of my normal glasses, I really dislike 3D being used as a thinly veiled ploy to get cinema-goers to fork over even more money (don’t even get me started on cinema food!), and I can’t stand it when 3D is needlessly shoehorned into films where it has no place whatsoever. So, I’m not a big fan and I find it largely a gimmick intended to get people to go to the cinema more, pay more and pirate less. I also have absolutely no intention to buy a 3D TV.
  • I’m not big on the whole motion-gaming thing. The Wii was fun and a novelty when it first came out. Wii Sports is still pretty fun, and The Legend of Zelda: Twilight Princess actually used it quite effectively for controlling ranged weapons. Other than those, I can’t really think of a single Wii game I own where the motion controls really add something. Many are downright terrible (Red Steel and Goldeneye being just two examples), and my favourite Wii games tend to be those that use little to no motion control at all. What’s wrong with buttons?

Because I really dislike cinema-3D, you’d perhaps expect me to dislike the 3DS’s 3D, and write off as a gimmick too. Only, I don’t. I like it.

First up, it’s just plain impressive. The adverts are right when they say you’ve got to see it to believe it, and you’ve never seen anything like it. Everyone I’ve shown the 3DS to (and people I’ve spoken to who have otherwise seen one themselves) have that ‘wow’ moment. It’s a bizarre feeling when you look at this little screen with your naked eye and see a scene that appears to stretch away into the distance. It’s just… cool. In some ways the screen looks like a little diorama that you’re peering into, and displays an impressive amount of depth.

I don’t like 3D films because it’s is often used where it doesn’t belong. Pixar films use it well and appropriately, and perhaps in some ways it feels like a better fit because the films are already sort-of-3D anyway. I think this may be one reason I like it on the 3DS though: the majority of games are already 3D. They’re already computer generated and artificial and 3D is just an extra visual filter to try and add an extra level of realism.

The tech is obviously still very early on, but I think it shows a lot of promise. The effect is achieved by the screen having a doubled horizontal resolution in conjunction with a ‘parallax barrier’, which blocks out particular pixels. In short, you can see a slightly different image from each eye which, when combined, form a 3D image. There’s no need for special glasses and you don’t need to go cross-eyed. It just works. This diagram roughly shows how the 3D screen works if you can’t quite visualise it.

The main downside seems to be that there’s a pretty limited viewing angle. If you’re just a few degrees outside of the optimum area where your eyes see the right images, you start to get a double image or a dimmed screen. In reality though, it doesn’t seem too difficult to keep yourself in that sweet spot - although I definitely see some occasional ghosting.

The other downside, of course, is that some people can’t see it (for example if they only have vision in one eye, or have a bad astigmatism). Fortunately, the 3DS features a ‘3D slider’ which lets you increase or lessen the 3D depth, or turn it off altogether. This is a big help if you want to play socially (for instance, Hannah and I have played through the Professor Layton games together in the past, and that just wouldn’t be possible with 3D on). I’ve read a number of reports of people leaving it turned off all the time, but for me it’s a big draw of the console and I enjoy how it looks.

The 3D is really going to prove itself as more games come out. At present, there’s a very limited range of launch titles, and I only own one of them: Ridge Racer 3D. I think it was a good first choice, however, as the tracks and cars feel solid, the 3D really draws you in to the first-person viewpoint, and there’s a good mix of distances to show off the effect. I can only imagine how awesome some of the upcoming titles are going to be. In particular, I really hope Super Mario 3DS introduces some new and interesting gameplay elements based on depth (although there are rumours that it won’t, so that people who can’t see the effect aren’t left out). Even if it doesn’t, it should make jumping between platforms a lot easier.

In summary, I really like the 3D effect. I think it’s clever, it’s something new, it’s innovative, and to me it doesn’t feel like it’s a gimmick (although I’ll be the first to own up if I’m proved wrong at a later date). You can certainly get by without it, and certainly the 3DS has enough of a hardware / graphical boost (and great titles coming in the future) it to warrant the upgrade without it, but I don’t see why you’d want to.

System software

The 3DS’s menu system feels much improved over the DS Lite. In some ways it’s similar to the Wii’s channel system, but overall is bit more modern and refined. There are, however, a few places where it does still feel somewhat outdated. For example:

  • You can only store settings for 3 network connections, when other modern mobile devices let you store as many as you want.
  • You can now ‘suspend’ a game and access the main system menu. The only problem with this is that if you want to access anything via the menu, such as system settings, you lose the suspended state of the game. What, then, is the point of ‘suspending’ it in the first place?
  • The system software is still very modal. You can do one thing at a time, and one thing only. Want to check for a software update? You have to sit there watching a progress bar, and you can’t do anything else until it completes.

I don’t really want to spend too much longer on the software, as this review is already gargantuan and I’m not sure how much of value I can add. The system software does its job, but I wouldn’t say it’s anything special. There are a number of features missing (a web browser and downloadable software / games are the main ones), but these are due to launch in the next few months. It’s yet another example of the system feeling rushed to market, though.

Games

There’s not yet much to discuss regarding games. The 3DS’s launch titles were largely not worth bothering with and were one of the big reasons I wasn’t sure whether to buy the system on launch. Since owning it, I’ve played Ridge Racer 3D (which I got with the console) and Rayman 3D (which I rented). Ridge Racer is pretty good fun and shows off the 3D well, but is just a fairly generic racer. Rayman 3D is a lazy port of a 12 year old game which was fun when first released but feels tired today.

I really bought the 3DS based on the promise of what’s to come. There are a number of exciting titles due out this year: The Legend of Zelda: Ocarina of Time, Star Fox 3D, a new Mario title, a new Mariokart title and a new Metal Gear Solid title among others. I really hope they can live up to my expectations. Ocarina of Time and Star Fox are both remakes (hey, this is Nintendo after all), but the originals were great, so I can’t wait. Mariokart DS still remains the best in the series, so there’s a lot of potential in a new DS title. And any new 3D Mario game instantly has my attention.

Future promise

The 3D brings something new to the table. I feel it’s currently let down by rushed first generation hardware, rushed and incomplete system software, and a poor lineup of games. However, I bought into it because of the promise of how it may evolve over the coming months. In June we’ll have Ocarina of Time which may well justify the purchase all by itself. The original DS was host to some great games, and some truly original concepts and as a Nintendo fan, I hope that upcoming titles deliver on their promise. The 3DS has a lot of potential, but if I’m completely honest I currently feel some amount of buyer’s remorse as the 3DS sits on a shelf gathering dust.

Your move, Nintendo.


  1. The pixel density on DS Lite was around 106 pixels per inch, and the 3DS raises that slightly to around 132 ppi; the same as the iPad (but of course on a much smaller display). For comparison, older iPhone models were around 163 ppi, the iPod Nano has been over 204 ppi since the 3rd generation, and the current iPhone and iPod Touch are 326 ppi. 

Saturday, May 14, 2011

Bleep Beep Beep Bloop: A List of Great Videogame Music

I love videogame music. Rarely a day goes by where I don’t have some game tune stuck in my head (Mario and Mariokart being the worst offenders). I find a lot of game music is great to work / code to, as it’s generally upbeat and devoid of lyrics. I thought it’d be fun to put together a short list of my favourite albums and share it here. I’ve put in download / purchase links where possible. For those without a link, you should be able to find them easily enough with a quick google.

If you think I’ve missed anything, please let me know!

  • Scott Pilgrim vs the World
    Megadrive-esque chiptunes with guitars.
    Amazon iTunes
  • Super Meatboy
    Kind of chiptuney but with real instruments. Fat bass.
    Bandcamp
  • Superbrothers: Sword & Sworcery EP
    Lovely folky chiptunes.. I’m currently working on a full review of SB:S&S EP, but needless to say it’s an utterly fantastic game. I love love love this album. It’s just perfect.
    Bandcamp iTunes
  • Super Mario Galaxy
    Can’t beat a good Mario tune.
  • Braid
    Classical soundscapes.
    Magnatune
  • Rez
    Dancey trancey dance dance.
  • Jet Set Radio
    Quite a fun mix: J-pop, hip-hop, funk, dance, electronic, rock, acid jazz, trip hop…

Tuesday, May 3, 2011

Tuesday, April 12, 2011