Okay, back into it! Last thing that happened was I shamefully confessed my incompetence about using green wood for the trophy bases and having them split. But, no real harm done – I got some other wood and repeated the same procedure, and it went better.

More importantly, I was about to experiment with colouring these white plastic prints. I’ve heard a few people recommend using textas (like a sharpie, I believe, for those who don’t know what textas are), which seems like a dubious option. However, I made a mistake on one of the models – the suspension line on the car which is supposed to be at right angles to the car body was actually rotated a bit. Various people have told me that I am being obsessive throwing this one out, and they might be right, but if anyone is going to notice besides me it’ll be the people who played the game enough to win the trophies, right? Right. So I’m going to practice colouring this thing green.

Half way done green car

By the way, see how the suspension lines in this model aren’t parallel to each other like they should be? Poor form on my part, but at least it meant I have a print to experiment with.

Pretty good even colour, but I couldn’t get into the crevices

As you can see, textas are pretty good for this purpose – I would wholeheartedly recommend them sometimes. But for this, ultimately, I couldn’t colour the whole thing – there’s no good way to get the texta down behind the wheels, and in practice, it’s pretty noticeable. Dang. Well, that brings me to attempt number two – I’ve got to dye these things. I found a helpful youtube video that told me how to dye shapeways plastic – so, let’s go with that. I’m going to make the gold medal car red, the co-op cars blue and green, and the secret trophy car blue (I asked Asier which he preferred). The goal triangle model won’t be dyed – it has to be different colours so that will take a different approach. I got some blue and red Rit dye, but they didn’t have any in a good green colour so I got a different brand called Dylon (the lady at the shop told me it was the same kind of thing). Naturally, step one is to clean the models with a toothbrush.

This part of the process was as exciting as it looked

Then came the mixing part. You see here half water, half vinegar, with a probably excessive amount of blue dye mixed in.

Primed and ready

Look at the car in the background there. It looks so clean! But, not for long. In we go.

This next part of the process took a while, featuring me initially freaking out that it’s not blue enough. In fact, I think I did that with all the dye jobs (although in some cases I was freaking out that it wasn’t red/green enough instead). But, so far, so good! I particularly enjoyed the car shapes on the paper where I dried it off while re-microwaving the mixture.

So far, so good!

After that, I had a minor hiccup with the creation of the green dye. I may have done some bad chemistry here, but in the end it worked fine.

Now I have a green table, so, that’s cool too

With the red car, I had a bigger problem. Let’s just say, any of you out there planning to dye shapeways white plastic red, don’t use Rit scarlet dye. I’m sure it works great on fabric, but…

This is really not the bright vibrant red I was hoping for

Okay, so, that colour is kinda terrible. I can’t go around calling that a red Colour Bind car – it would make a mockery of everything I stand for. I fixed it by painting over it with some red paint. This actually worked much better than I was expecting – I was worried it would ruin the texture of the model, but figured if it didn’t work I’d just have to re-print the model but at this point that would be necessary anyway. But instead, it worked perfectly! Unfortunately, I didn’t take a photo of this at this stage – but this car will reappear later so you can check out its proper colour then.

Okay so there’s one other thing I’m going to talk about. If you go back to the first blog post and look at the initial 3D models, you can see that the car in the Secret Levels trophy is sitting on a sort of curvy platform, not dissimilar to the shapes in the game. Likewise, the goal triangle in the 15 Platinums trophy is supported by a similar curvy shape. Since I’m no longer planning to 3D print these bits, I needed an alternative plan.

I tried a few things. Initially I thought the best would be to get a bit of thick grey plastic and cut it into shape, but obtaining plastic of that nature turned out to be harder than I was expecting. I tried out a similar plan with one of those plastic chopping boards from the supermarket, but it didn’t receive dye or cut very well, so I gave up on that and got some extremely fine chip board. It’s strange stuff – kind of more like very thick/dense cardboard than wood. But, hopefully, this would do the trick.

My initial plans to cut the shape out roughly with a bandsaw failed due to inferior cornering ability, but a quick wikipedia search revealed that what I really wanted was a coping saw. Predictably, a quick search of dad’s workshop revealed that we had one already. I cut the very rough shape with a bandsaw and then drew a guide line with a biro and got to it.

That’s the easy bit done

I have a few more cuts to make, obviously. Incidentally, in the above photo it’s actually screwed to the base (that is, screws going up through the base and into the underneath of the shaped bit) – I figured I was less likely to split the wood/cardboard/whatever if I drilled holes in it now rather than after it was cut into shape. Spoiler warning: It kind of split anyway, but it wasn’t too bad. Anyway, I also drilled the little hole for the car’s peg thingy to fit in, to make sure the whole thing was going to work, and it seemed pretty good. So, I disassembled everything and got back into it with the coping saw.

Getting this shape was a bit tricky – had to be done in two parts

And after part two:

Here it is after part two, but it’s a little rough

So clearly that ‘curve’ I’ve created is less curvy than is ideal, and I can’t easily sand it down like I can the other curves because there’s no room. A while ago, I tried my hand at whittling, and I have a nice sharp knife around, so I decided to try whittling the corner away to a slightly nicer curve. Here was the result:

Not bad – hopefully will look nicer when painted.

Now, clearly this is not finished yet. However, once again, this is one of those times I foolishly failed to take more photographs, so you’ll have to wait and see how the other cuts went. Long story short, though, I cut the other bits out and then sanded the whole thing a whole bunch. I also made the shape for the other curvy bit, using basically the same method – more on that later.

Next up, I’m going to be painting some stuff. The wooden curvy stand things need to be a nice shade of grey, and I’ve got to figure out some kind of plan for the coloured goal triangle too. That’s it for now though – I’ll be covering that stuff in the next post.

You can find some of the backstory explaining this elsewhere on the blog, but to cut a long story short, I made a game. It is called Colour Bind. It’s a physics/puzzle/platform game, and it’s quite challenging. I promised physical trophies would be mailed to people who were the first to achieve various epic feats of brilliance in the game.

This is the story of these trophies.

Now, it’s important to note that I don’t know what I’m doing when it comes to making physical stuff, and I don’t have much of a budget either. What I do have is access to my late father’s workshop (I say without hyperbole that he was a million times better at this kind of thing than I could ever hope to be), and an internet full of advice on how to do things. I was determined to make the trophies like the game – not necessarily perfect, but unique, and made by me according to my own twisted sense of aesthetics. So, off we go.

My first thought? 3D print these suckers. Shapeways lets you print stuff in all manner of crazy materials – I can just make the things in some 3D modelling software and then send them off and we’re all good. Here’s what I came up with:

Straight from my modelling program. Not to scale.

Pretty ace, right? I thought so too, even if I didn’t get around to attaching Asier’s name to the trophy before I took these screenshots. Anyway, you see what I’m going for. The All Gold and the Coop trophies are the simper ones, but the 15 Platinums (platina?) and the Secret Levels trophies are a bit fancier, because those are the two very difficult ones. I was all set to go. After some wrangling to get them into the right file type (the polygon soup outputted by programs like 3dsmax isn’t what you want – volumetric data is what 3D printers crave), I uploaded them to Shapeways. To my considerable suprise, I had managed to create them all devoid of geometry problems, first time, and they were ready to print!

Unfortunately, there was a bit of a snag. If I wanted them to be of a reasonable size, this was going to set me back quite a bit, even if I just printed them in the cheapest white plastic – certainly getting them in stainless steel or anything fancy like that was going to cost hundreds of dollars at this size. So, I need a better plan.

I got to thinking – printing the cars and stuff makes sense, because I don’t know how I’d go about building one of those cars by hand. But the trophy bases, as well as the curvy bits in the Secret and Platinum trophies, are simple enough shapes – maybe I can make them in some other way.

My new plan is to make the bases out of a slice of wood. I live on a farm, so wood should be reasonably accessible, right? I get a small log, cut a slice of it, and from that slice I shall shave off a face, and that face will give me a place to attach a plaque. Then I can put the model on that. That’ll save quite a bit of 3D printing volume already, and might also make the trophies more interesting.

So, let’s get started. As luck would have it, I had to cut down a couple of almond trees a few months ago (don’t feel bad for them – they were rubbish at actually growing almonds), so I’ll cut myself a slice of that and see how it goes.

Gratuitous chainsawing photo

There was also some cutting with a regular hand saw in there, but it didn’t make for very interesting photos, so I’m just going to cut to the ‘finished’ product. Don’t act like you’re not jealous of my double glasses set up here, either.

The flat bit is where the plaque would go.

I’ll go into more detail later about whether or not my plan to use totally green almond wood for the base works out well (it doesn’t), but around this time I was distracted because my 3D prints had arrived! Check it out:

A handful of Colour Bind cars, and one goal triangle thingy.

These things are so cool! The ability to go from 3D model to 3D object like this is kind of magical. I’m definitely planning on doing some more of this in the future.

From left to right in my left hand, we have – little blue car that I printed for fun and to see what the colour prints were like, gold medal car, secret levels car (note that it’s riding low on its suspension, just like in the game!), the two coop trophy cars, and then another car for a separate thing that I screwed up and didn’t end up using. And of course in my right hand is the medal thing that goes on the platinum trophy. Note the little pegs that most of the models have, to attach them to the various things they need to get attached to. In my next post on the subject, I’ll be talking about taking these prints from white plastic to the colours I need them to be, including the rather onerous problem of getting the goal triangle to be a blend of red, green, and blue.

Before I do that, though, a brief note about the trophy bases. Of all the dumb mistakes I made on this project, the one where I really should have (and on some level, did) know better was cutting a base from undried wood. Woodworkers reading this will know where this is going – when wood dries it will warp and crack, and that’s exactly what happened with this. In the end, the almond wood bases that I made were thrown away, and I did basically the same process to cut some more out of some redgum we have (firewood – nice and dry), as well as some other nice-looking stuff I found downstairs that I think Dad cut from a cherry tree years ago and kept it for some project that never happened. For some reason, I neglected to take any photos of that, so you’ll just have to trust me – the bases show up in later photos, of course, so you’ll see what I’m talking about in the next couple of posts.

Well here’s an interesting thing that I haven’t gotten to the bottom of yet.

I was just recently putting together an entry for a game competition. Since I like to mess with shaders and other odd graphics card things, examples of that activity needed to be collected for the submission. Among them was a thing called the Cave Demo – basically the idea is that it was to be a game where you are exploring a procedurally generated cave, but unlike most such caves, this one has its generation parameters tweaked on the fly, causing it to shift around all crazy-like. Unfortunately, I’m not convinced that this was going to become a good game, so for the moment I’ve stopped working on it – it did result in some really cool -looking things though, at least to my tastes.

As it turns out, rendering a cave each frame is pretty easy – you render a bunch of stuff into a greyscale image, with the map representing some kind of density function, then by rendering with that image as your punchthrough texture you do a sort of automated Marching Squares thing, and bam, you’ve got a cave. You can render greyscale images into the cave buffer additively to get various effects like platforms appearing and disappearing, that kind of thing. It’s neat. From there it’s just a matter of interpreting the density map in a more complicated shader to generate a more impressive looking cave. Obviously this is a really ineffective explanation because how this was all done is maybe a blog post for another day.

Anyway, the key to this is that that’s actually not all that’s required if you want to have actual gameplay that interacts with the cave. This ever-changing cave will be needing functional collision detection, and for that, we need to get some or all of the cave buffer from video memory back into main memory so the CPU can deal with it. This can be annoying to set up, and it’s not the speediest operation in the world, but it’s doable and I did it and I was quite pleased with myself.

Fast forward to the other night, where I’m assembling a bunch of videos of stuff I’ve worked on to prove to people that I can make stuff. I fire up my trusty FRAPS and record what I presume to be some rad footage. I open it up in Media Player Classic and am confronted with something way way less rad than I was expecting. Rather than capturing what was actually on the screen, FRAPS has captured the contents of the cave buffer – a weird-looking blurry image about a quarter the size of the video frame, and wholly unsuitable for entering into a competition of any kind.

This was pretty soon before the competition was going to close, so I didn’t really have time to do much about it other than use a camera to film the footage and hope the resulting low quality doesn’t offend people too much. I did manage to figure out that the act of getting stuff back from the video memory to the main memory was what was doing me in. I discovered this using the time-honoured debugging technique of commenting that bit out and seeing if it fixed the problem. So that gives me something to go on, although it didn’t actually help at the time because of course getting rid of all the game’s collision detection kind of broke things. When I do figure out what’s really going on here and if there’s a way to get around it, I’ll update this post with more helpful advice.

In the meantime, don’t make the same mistake I did! There are things that can trip FRAPS up.

This is going to be a short but technical post, about some information that I found surprisingly hard to find online. If your a programmer in the gaming world you’re probably pretty familiar with a depth buffer. If you’re not, you might find this post a bit confusing or tedious.

One thing you might know about depth buffers is that they don’t exactly store a simple depth value. They store a weird non-linear version of it, in a clever way to get you better depth precision closer to the camera. A good write up of the gritty details of how this works can be found at this article here called Depth Buffer – The gritty details.

Another thing you might know is that although the depth values written out are usually pretty standard (and derived from the depth of the pixel in the way described above), it’s possible to write non-standard depth values from the pixel shader. This can be useful for techniques such as imposters.

I had need recently to fake some depth values, and I was surprised that I couldn’t find the formula for converting to standard depth to depth-buffer-friendly depth. Perhaps this is because my google-fu is weak – I’m not entirely sure – but I did eventually figure out the maths required and I present it here on the off chance that someone finds it helpful.

You will need three numbers. The near and far clip distances set on your camera, and the depth of the fragment. Note that this isn’t quite the same as the distance from the camera to the fragment – it’s the distance in the direction of the camera’s forward vector (that’s what you get by multiplying the fragment’s world position by the view matrix and taking just the z component).

So to get from there to the value you write to the depth buffer, here’s what you need:

That’s it! In glsl you write that value to a built-in called gl_FragDepth – how it’s done in other shader languages is an exercise for the reader, because I have no idea.

Anyway, I realise this article falls quite a bit shy of a proper tutorial on depth buffers or imposters or whatever – maybe I’ll come back and write one of those later – but for the moment I just wanted to write down that formula. I hope somehow it is useful for someone’s particular purpose.

Last weekend was the global game jam. I was there! Good times were had, presumably by all. I’ve been to a couple of these now, and I’ve heard some discussions of what the point of them actually is. I think that there are lots of possible uses for the things, but it helps to have a good idea in your head of what you’re looking to get out of them.

To prove to yourself that you can finish a game. This is important for the newbies among us. I had some friends at the jam this year who had done a bit of programming, messed around with some tools and such, but never really made a whole game. Now they have. It’s kind of a trial by fire, but whether you finish your game or not, you emerge with a new understanding of how game development works.

To experiment with no consequences for failure. Often, experienced developers haven’t had the opportunity or the motivation to just try something crazy, and hang the consequences. Motivation is key here – it’s one thing to have an idea in your head, but even if you could implement it yourself in a weekend, it’s a different matter to be ‘forced’ to. For experienced developers who are planning to ‘go indie’, this can also be an important lesson in the practice of prototyping – making something, finding that it sucks, and fixing it or throwing it away. May as well get your quota of bad games made before it matters.

To make connections. Personally, I hate making connections. Let me revise that – I hate attending networking events. Frankly, I think a lot of people do. Worse than being unpleasant, though, they also don’t really tell you whether or not you can work with a given person – just whether or not you can stand to have a beer with them. Game jams are a good way of answering that question without going to all the trouble of getting yourself into a potentially long term business situation. Both the game jams I’ve been to have left me thinking “Why don’t we do this every weekend and make a business of it?” and, ill-advised though that thought is, I’m sure I’m not the only one who has turned fellow jammers into co-developers.

To start making a game. Seems kind of obvious, I suppose. You might have heard of NaNoWriMo, or National Novel Writing Month, an event in which a group of deranged individuals (yes I have been among them) attempt to each write a 50,000 word novel in a single November. A lot of people make use of it as a way of just getting a terrible book written, upon which they can then improve – some find the challenge of just getting from nothing to something the biggest challenge of all. Is that you? Having one intense work weekend forced on you can break the back of resistance to making a new game. Particularly in the casual/mobile/whatever space, a pretty big amount of work towards a finished game can be done in one weekend. This works pretty well with the dot point above, too.

To have a party. My motivations for going to game jams these days is a combination of experimentation, networking, and prototyping, but I have to admit that it’s also just because they’re fun. I’m not all that much of a one for drinking or clubbing – when I was younger, people would often ask me what I do for fun, if not that. ‘Game jamming’ seems like a pretty good answer to me. My other reasons for game jamming might deteriorate in the future, but when someone asks me “Do you want to go to a weekend-long party where, instead of getting drunk and shouting over loud music, you make games?” my answer will always be ‘yes’.

Okay, those are the reasons I can think of. Either you’re one or more of those reasons, or you don’t want to go to a game jam. Or my list isn’t comprehensive – a possibility that, for the moment, I will pretend doesn’t exist. In any case, I’m going to attempt to dispense some advice for potential jammers.

Team members should aim to be of similar skill levels. In particular, this is for the newbies. I welcome positive experiences to the contrary – this is just my gut instinct – but the education benefit of a jam is, in my opinion, largely for trial-by-fire nature of it. Having to figure something out, or else it doesn’t get done, is a good way to be forced to learn, and while having an expert around to guide you will certainly make your game better, I think it’s better to make a crap game and learn than it is to make a less crap game and learn less. The other reason for this is… well, lots of people are happy to teach those less experienced than themselves, and some people sign up for 48 hour game jams, but few sign up for 48 hour teaching jams. If someone’s going to be helping you learn for the game jam, you should make sure they’re up for it.

If you’re just there to have fun, you should still care about finishing your game. It’s like a competitive multiplayer game – you don’t have to be cutthroat about it, but the players should at least try to win, or else the gameplay falls apart. Game jams are fun because you’re trying to make the game. If you end up dicking around and not caring, it’ll won’t be fun anymore. Especially not if your teammates have reasons other than fun for being there.

If you are there to make connections, don’t form a team made up exclusively of people you know and have worked with before. Yeah.

If you’re planning to sell your game, make sure you’re happy with your teammates. Finishing off polishing up your game and selling it means these people will be your team mates for a while longer than 48 hours. If you’re not okay with being a potentially weird shared IP situation with them – you can’t always choose your team, after all – consider shelving that plan for the moment.

If you really are only there for the fun, don’t do something safe. If you’ve made a game in 48 hours before, try to make something more ambitious this time. Pick one of the crazier diversifiers, or do something weird and unexpected with the theme. Don’t be that team of experienced developers making the same thing they’ve made before and with no stress or excitement.

Get a somewhat reasonable amount of sleep. I’m not saying reasonable by normal standards – you’re probably sleeping on the floor in your clothes surrounded by strangers, after all. But you don’t want to be falling asleep on days two and three, either. My first game jam, I slept two hours the first night, then the evening after that I spent four hours programming a system that I got so confused and confounded by that I eventually had to scrap it. If I had just slept for those four hours instead, I would have gotten the same amount of work done, and I’d have been more awake at the end of it. If you’re on a team of crazy people attempting some kind of personal challenge, have at it, but let’s not pretend that working for two days without sleep is going to help you achieve optimal productivity.

Okay, that’s the end of my game jam advice. I hope it was of some interest. If for some reason you were persuaded by my advice to not attend a game jam, that’s because I made a mistake, and you should disregard it and go anyway. Seriously, if it seems at all like something you might like, give it a crack – it can really be a great weekend.

So, I’m Finn and I like to make games. Other things too, but most of them are at least somewhat game-related. A little while ago, I made a whole game and released it, but unfortunately not that many people played it, and I have resolved that next time I make a game I will at least have talked about it on the internet a bit before release. This blog represents my attempts to do that.

Probably there’ll be lots of different things posted here. Eventually, it will be a place to talk about my/our next proper gaming project, but it’s not really far enough along or sufficiently concrete to talk about yet – in the mean time, I’m planning some articles about game design, weird or interesting tech that I have worked or am working on, and other random game development things too. I’m interested in lots of aspects of game development, but things I write will tend towards the subjects of shader and graphics programming and procedural generation. If I can’t think of anything better to write, I might throw in some tutorials and stuff like that. I probably won’t be the only one talking about stuff here, but I’ll leave it up to the other members to explain themselves.

So that’s that. Once I’ve written something more interesting, I’ll start spreading this blog around. If you somehow found your way here before that happens, apologies for the lack of content but stay tuned!