Navigation

Feeds

News

The latest news, project announcements, etc.

Adventures in laser cutting, and Unity

posted 13 Jan 2012 17:57 by Simon Hildebrandt

Just a quick post to show off what I've been playing with recently - Laser cutting:

...and Blender/Unity:

(That's a cartoony little taxi, with it's wheels yet to be bolted on...)

Now, off to narrate another story - Tony is a harsh task master. :)


Latest story on Starship Sofa!

posted 23 Oct 2011 04:16 by Simon Hildebrandt   [ updated 23 Oct 2011 14:05 ]

My narration of Joe Haldeman's "Never Blood Enough" just landed on Starship Sofa. Enjoy. :)

DNJNLY: 1

posted 8 Aug 2011 03:21 by Simon Hildebrandt   [ updated 8 Aug 2011 03:30 ]

To start with, we need to do a little setting up and brainstorming. To this end we've:
This all allows us to test our tools, and start experimenting without getting too deep into code up front.

New Project: DNJNLY

posted 3 Aug 2011 16:05 by Simon Hildebrandt

Like most things, programming is something you learn by doing. With that in mind, I'm embarking on a project to teach my friend Peter some programming skills the most entertaining way I can think of - by writing a game.

Game Idea: DNJNLY

DNJNLY, or 'Dungeonly' was inspired by researching 'Roguelike' games, and Desktop Dungeons. It looked like one of those deceptively simple game ideas - something easy to make a basic version of, but with lots of opportunities for complexity.

Language: Python

My language of choice for this project is Python, for a couple of reasons. Python combines great readability with great library support, meaning that we'll be able to build quickly and easily, while experiment along the way. 

Library: PyGame

Particularly, we'll be making the most of PyGame, the famous Python library wrapped around SDL. PyGame has a strong established community, and is particularly friendly to newbies, so it's perfect for our purposes.

Tool: Google Docs

Something people often underestimate when building games is the amount data involved. To keep manage and share our level assets and other structured data, we'll be trying Google Docs.

Tool: GoogleCode, TortoiseSVN

We'll need something to keep track of our code and art assets, particularly because we're working from different countries (The Netherlands and Australia.) Google Code has served me well in the past for basic Subversion project hosting, and TortoiseSVN is a solid, newbie-friendly tool for accessing Subversion. (For a more advanced project I'd probably use Git/Github, but I find that a little less friendly to new users.)


Procedural Content

posted 4 Apr 2011 16:18 by Simon Hildebrandt

Just saw this post on BoingBoing about Minecraft world generation seeds, and was struck by the evolution we're seeing in virtual world content generation.

Hand-crafting content for virtual worlds is limited by the law of diminishing returns - it takes an exponentially growing number of man-hours from very highly trained artists to produce the landscapes and interactions we come to expect from our games and other forms of entertainment. But there's a sea-change happening - more and more developers are looking for ways to generate content procedurally, using algorithms that either mimic the natural processes being modelled, and/or using mathematical tricks that work around the unpredictability of the real world.

A good example of this is physics - rather than hand-animate the motion of objects we've handed control over to simulation mechanisms, and focussed instead on tweaking the rules to make the experience satisfying. These days even dinky mobile games like Angry Birds have a physics simulator in them (in this case the enormously popular Box2D) and character animations - usually the domain of serious hand animation or motion capture - are now handed over to ragdoll simulators, for more realistic tumbling and flopping.

Landscapes, too, get simulated - from a height-map modulated by perlin noise, to Dwarf Fortress' complex geological algorithms, there's lots of approaches being experimented with. My favourite currently is 'Dust', a new project from Eric Chahi (of 'Another World' fame) because it includes a stunning physics simulator that allows users to dramatically mutate the landscape. Internal terrain, too, can be generated - Sean Howard has some great ideas on the procedural content part of his '300 Mechanics' website, and Introversion Software's Subversion project is generating some wonderful procedural cities.

(This all has in interesting parallel to the real world (and here's where we come back to Minecraft): if all the rules of a system are fixed (like they are in, say, real world physics) then the state of the whole universe governed by those rules is determined by a small set of initial conditions and constants (just as physicists suggest our real universe is.) So in a sense a Minecraft 'seed' captures in one value the initial conditions of a universe - makes you wonder if there's a similar number for our universe, doesn't it?)

Giving players access to the mechanism that generates their game world is a great step for Minecraft, and got me wondering what else might be possible. Any place where a significant amount of content needs to be created (like quests for an MMO - a lot of them feel like they were written by a robot anyway) offers us an opportunity to experiment with procedural generation - and if we can capture stats on user's enjoyment of that content then we can even leverage the wisdom of the crowds to rank and prune contenders, allowing us to explore the space of potential quests for the ones best suited to our player base. The possibilities are endless, and I'm greatly looking forward to seeing what game companies do with this next.

...and more podcasting

posted 3 Feb 2011 14:59 by Simon Hildebrandt   [ updated 3 Feb 2011 15:04 ]

Still waiting for Tony to slot the Will McIntosh story into the 'Sofa, but meanwhile my newest narration is now online - 'A Professor at Harvard', by the excellent David Brin! Here's a link to the episode, or straight to the mp3.

Now I need to get back to work - I've got a very interesting story to record, and it's the most musical I've done so far...

On the topic of podcasting...

posted 29 Nov 2010 16:17 by Simon Hildebrandt

...the excellent Starship Sofa podcast has recently published Walter M. Miller's "Death of a Spaceman", narrated by yours truly. Check here for more info, or here the audio.

...and keep an eye on the Sofa for another story narrated by me (already recorded and currently being edited together) - this time written by the excellent Will McIntosh.

And now for something completely different... RadioLab

posted 11 Sep 2010 16:52 by Simon Hildebrandt   [ updated 29 Nov 2010 16:17 ]

RadioLab is a podcast that I've just been exposed to, and I have to say - it's terrific. I can't begin to describe all the intriguing stuff they explore, but here's just a very quick taste from a recent episode, Strangers in the Mirror.

Oliver Sacks is a fascinating figure to me - I've followed his considerable achievements as a neurologist and read some of his excellent books (including an autobiography I recommend, Uncle Tungsten.) So I was shocked to discover that he himself suffers from an interesting neurological problem: face blindness, more properly named prosopagnosia.

The RadioLab episode includes a public interview with Sacks where he reveals, with his usual self-deprecating humour, that not only has his condition led to his apologising to mirrors, but:

“Recently I was in a cafe in Chelsea Market with tables outside, and while I was waiting for my food I [did] what people with beards often do - I started to... preen myself - and then I realise that my reflection was... not doing the same thing. Inside was a man with a beard [...] who wondered why I was making faces [at him].”

(He also described his condition in an audio interview with The New Yorker.)

Opposite Sacks in the interview is a fellow sufferer Chuck Close, a portrait artist who describes his work as an essential part of his mechanism for coping with his disability. Between them they explore their experience of the disorder, and how they use humour and their considerable intellects to work around it.

Edit:
CBC's Quirks and Quarks ran a segment recently called 'The Man Who Mistook Every Face' about prosopagnosia - the show notes are here, and the segment audio is available here.

Tip of the Day: Advanced Android emulator control

posted 11 Aug 2010 20:17 by Simon Hildebrandt   [ updated 11 Aug 2010 20:21 ]

I've got a crashing bug in my current Android app project when the screen reorients (switching from portrait to landscape or vice-versa) and I thought I'd have to resort to a live device for debugging, as the emulator doesn't have any visible controls to affect orientation. But dig a little deeper, and:

http://developer.android.com/guide/developing/tools/emulator.html#controlling

Bingo! Shortcut keys for almost everything I might want to do!

Tip of the Day: Vector rendering in Android

posted 4 Apr 2010 12:16 by Simon Hildebrandt   [ updated 23 Mar 2011 14:15 ]

As part of getting to know the Android API better (and inspired by a passion for retro vector game art) I decided to jump into Android's 2D graphics system and see what damage I could do. On the right is the result, the source is over here, and below I'll talk a bit about what's going on.

For those a little new to this kind of thing, vector graphics are a common alternative to bitmap graphics - where bitmaps involve sending around a grid of numbers representing the colour of pixels, a vector image is a set of instructions describing how do draw the image, using basic drawing operations. If you've ever seen programs like Inkscape or Illustrator or used Flash, then you've seen vector graphics in action - lines, curves, flat colour fills and gradients, and more.Android has an extensive vector drawing API, which it uses to build UI components and other graphical stuff - but we can use it for anything, including fancy animated effects, even games.

On to my little app. TeethApp is a just a regular Activity, with the standard boilerplate OnCreate method. Ignoring a little bit of setup, the only interesting thing we're doing is not using the default layout XML file in the setContentView call - instead we're declaring a new instance of a nested class. So let's start there.

class TeethView extends View

Everything starts with a View. Views are the primary display building block in Android - everything from a full page window to the smallest widget subclasses this workhorse. TeethView is an incredibly simple example of this, overriding only two methods - onTouchEvent and onDraw (I'll get to the touch stuff later). onDraw is where we get to take control of how our View gets rendered, and we get passed in a Canvas object to work with.

Canvas is a class that wraps all the drawing logic we need around a destination bitmap - the 'canvas' we'll be drawing on to. It does a lot of the heavy lifting for us like tracking where on the bitmap we're currently drawing (through different translations and rotations) so that all we have to do is pass it the drawing instructions, and some information about the style we want everything drawn in. Style? Well, we'll need to pick colours, keep track of details like drawing dotted or solid lines, and whether we want solid shapes or outlines... the details of which are kept in a Paint object. Here's some of the settings I use in this app:

Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setStrokeWidth(3);

That's anti-aliasing (smoothing) being switched on, and the width of lines that will be drawn being set to three pixels wide. Later in the code you can see I set the drawing colour using setColor to one selected from the colors list and, depending on whether the cog we're drawing is currently selected we set the drawing style to FILL (solid) or STROKE (outline) mode. (Please forgive my switching spelling of 'colour' between the Australian in text, and the American in code - when in Rome...)

The only remaining piece of the puzzle is the drawing instructions themselves, and the API gives us lots of options. The Canvas object can draw arcs, lines, do colour fills, draw pictures and text in any style, but I knew from the outset that I wanted to manage quite complex sets of instructions, and for that I needed a Path.

The Path class lets us encapsulate a group of drawing instructions, and makes it easy to build what we think of as a shape - a closed outline made up of straight and curved lines. You're not restricted, though, paths don't have to be closed - and It'll even let you build hollow shapes (like my cogs) if you're so inclined. The cogs I'm building aren't much more than just fancy Path objects so that's where I subclassed from, and the only tricky thing going on inside is a little bit of logic in the constructor that cooks a tooth count out of the cog's radius.

buildPath is where the action is - a lot of magic trigonometry to generate the points along the outline of the cog shape, then the real meat - the moveTo and LineTo calls. moveTo sets the next place we'll start drawing, LineTo describes a straight line from the current place to a new point somewhere else. In my code I generate points in advance and then draw between them, with a close call afterwards to connect the last point of the path with the first - not required, as I said, but appropriate for the shape we're trying to make.

Once we've built drawing instructions for the outer border we add an inner circle for style (oriented counter-clockwise to gel properly with the clockwise contour of the teeth) and we're done populating our Path. Back in my onDraw method the whole lot gets passed to Canvas.drawPath, with our painting instructions as a parameter - very simple, very neat. For fun I added an onTouchEvent handler so the user can drag the cogs around, and if I ever get really inspired there'll be enough brains to keep the cogs from intersecting, and maybe even cogs driving each other - who knows.

For now, I'm impressed with what I've seen - I could build a decent number of quite complex shapes and with virtually no optimisation I got a quite nice frame rate on my old G1. Take it for a spin yourself and let me know what you think. :)

1-10 of 28

Sign in  |  Recent Site Activity  |  Terms  |  Report Abuse  |  Print page  |  Powered by Google Sites