Interactive tabletop playing surface (Space Hulk Hobby Challenge)
Recommendations: 402
About the Project
Originally an idea for a two-player digital Blood Bowl game, I am creating a generic interactive playing surface - allowing players to hook up their tabletop miniature games to a tablet or smartphone. This would enable players to compete against a simple AI-based opponent. Excitingly - and inkeeping with the new Space Hulk video game, allowing players to play as either Space Marines or Genestealers - it would also allow two players to compete against each other, over the internet. Work on the underlying technology has been a hobby project for a while. The latest version allows anyone to use the system with their existing miniatures, using nothing more than a simple disc magnet. This competition encouraged me to get my finger out and actually complete the hardware and make a workable, two-player game, to demonstrate the potential of such a playing surface.
Related Game: Space Hulk
Related Company: Games Workshop
Related Genre: Science Fiction
This Project is Completed
First hardware test...
Strictly speaking not the first but the first one that wasn’t clunky and didn’t crash my tablet or throw a screenful of errors, so I’m calling it the first successful test.
So what are we seeing?
In a poorly shot video, with no audio, with terrible lighting and a tablet screen that is not only too bright, but reflects everything in front of it, at least you should get some idea of how it will (eventually) work.
We place our miniatures into a square in the bottom-left of the playing surface (offscreen in the video) to select which of our intrepid heroes will take to the board. Once the appropriate character appears on the screen, we then place them on the playing surface and their digital avatar appears on the screen.
Note how the on-screen avatar changes the direction they face, as the character moves; this is important – they always face the direction of travel. If you want to change the direction they are facing at the end of their move, you need to specifically change their facing.
You can select from all available actions for each character by simply picking them up and placing them back down in the same square. So after our first character, Sergeant Johnston is moved around a little bit, the only action(s) available is to turn around. In the video we can see that the action “rotate” has been selected and when we place the second character on the board, “Sarge” turns to face them.
The second character, Corporal North has two actions available (since not moving so much, has more action points to spend on different actions)
At the minute my digital game doesn’t follow the rules of Space Hulk so closely, with command points and so on, but will be amended once the core functionality has been built and tested.
As well as the turn to face action, “Corp” also has the fire at target action available. I really wanted to keep this for another video, but was so pleased with how this has all worked out, I couldn’t resist showing it off….
Remember in the earlier video, when demonstrating firing from one character at another, the placeholder graphic was just a white sphere (which made it look like all weapons were loaded with ping-pong balls)? And remember in another video, showing the online/web editor, we gave Corp. North a flamethrower?
Did you notice how the digital avatars onscreen are slightly different? How one is carrying an assault rifle, and another a dirty big flamer gun? Just like their online character profiles?
Check out what happens when a flamethrower is fired…. we’re not talking puny little ping-pong balls in place of lasers any more! Woof! Take that….
At the moment, all characters can suffer from the effects of friendly fire. I’m not quite sure what the rules for Space Hulk say, but I quite like it. I might keep it in.
In the meantime, I’ve got an entire spaceship to put these little digital dudes in. And only about three days to do it…..
Turning Hurst Arts digital
If you search the Google Sketchup Warehouse for “Hirst Arts 302” you’ll find some kind soul has recreated the core Hirst Arts sci-fi range as a series of 3d models.
With a bit of jiggery-pokery, I managed to get these models into Blender. Then, after a crash course in how to use Blender (and £9.99 on the Udemy store for some video lessons) I discovered UV-unwrapping; after applying a few textures and copious amounts of copy-paste, I managed to recreate one of my own Space Hulk sections in Blender!
Unfortunately, my material texturing skill as about as poor as my Blender modelling skills and – although the result was quite pleasing, in that I could say “look what I made” – the end result was pretty underwhelming. What’s more, when I imported the model into Unity, it just looked weird and poorly made (which, let’s be honest, it is!)
So recreating digital versions of my Hirst Arts terrain is out (at least if I’m going to get anywhere near the deadline for the Space Hulk Challenge). Luckily, I had accesst to a top-down sci-fi environment I’d bought from the Asset Store a few years ago, when I first started playing about with Unity.
It looks great, has some amazing lighting and is made also entirely from “prefab” objects – doors and walls and floors that I can simply drag and drop into my own project to create rooms and corridors.
Now it’s not an easy job by any stretch, recreating an entire spaceship, even from prefab models, in Unity. But I figured I could give myself a day or so, to give it a go. So while I’m not going to get an exact facsimile of my tabletop game on the screen (much like the onscreen avatars don’t actually look like the miniatures on the board) hopefully the end result will be “close enough”.
At least close enough that each section is recognisable.
I’ve booked the day off work, I’ve got the coffee machine on permanent standby and about a dozen or so terrain pieces to turn into miniature digital works of art. Let’s see how we get on……..
More terrain building
Well, we’re hitting crunch time and having to cut some corners focus on the essentials for delivery. Originally I had grand ideas of using a 3d printed floorplan, or – at the very least – some diamond-tread plasticard for the floor tiles (http://www.greenstuffworld.com/en/textured-sheets/129-abs-plasticard-diamond-textured-sheet-double-thread-a4.html)
But with deadline day looming and a whole load of items still “stuck in the post” it’s time to focus on just getting things done. One of these such jobs was putting the floor tiles down on my Hirst Arts cast rooms/corridors.
Having a laser cutter is such a bonus – not just for the day job, but to be able to turn an idea into a reality in less than an hour. So some quick sketching in Inkscape and 20 minutes later, I had a bunch of 38mm square tiles, all cut from black artboard (at least one step saved, in that I don’t need to prime them all black to begin with!)
Having used a really simple colour scheme on the walls (cream drybrushed over black) I didn’t want to go too detailed on the floor, but having some kind of texture would be nice.
An acceptable compromise was to drybrush the black card with a really old, nasty, super-stiff-bristled brush and some shining silver acrylic.
As well as adding a dash of colour (which, combined with the dull cream of the walls, I’m still not 100% certain of) the nasty cheap brush also created plenty of texture – brushmarks looked like scrapes and scratches on an otherwise bare metal surface.
Some of the tiles needed a little trimming to get them to fit around the pipes and other details on the Hirst Arts detailing. But all in all, not a bad job for an hour-or-so of work. Now just the other eleven terrain pieces to go….
Matching terrain to 3D models
Ok, it’s not a perfect match. But hopefully you can see how I’ve slowly managed to replicate the room layouts from the tabletop terrain in the app. The middle section of the (digital) map may not look much like the Hirst Arts moulded terrain, but it does follow the same layout (a 3×2 offset corridor).
I honestly thought that throwing together a few pre-made 3D models would be quicker than this! But making sure that every floor tile and every doorway lines up, when multiole room “sections” are placed together – that takes a lot of time and precision!
Still, there are a few hours yet to go this evening, maybe I might just get a map finished before the end of the night….
Anyone know anything about lighting in Unity?
Seriously, it’s been a while since I did anything more than just a simple UI/interface in Unity and a very long time since actually writing anything that resembled a game (probably last time I actually finished writing a game was back in the days of the GameBoy Advance when some wag found a way of pirating games, and the homebrew coding community used it to put their own games and apps onto the device).
I’ve had all kinds of problems trying to understand lighting in Unity, all to no avail.
So I’ve just deleted all the light probes, set all material shaders to Standard (diffuse) and set the light intensities from 5-6 down to 2-3. I also removed all baked lighting information and just ran the game from there.
It doesn’t look terrible.
But it does look a bit like a game from 1989 on the Sega Megadrive, filled with garish colours, just to demonstrate a full 256-colour palette. It’s not quite the look I was aiming for!
It doesn’t look anywhere as cool as it could do, if only I properly understood this crazy new real-time system; like everything in the coding world, it feels like everything used to be so much easier than it is today!
Testing doors and line-of-sight
Dammit. Doors are a real pain.
Because not only do they block your line of sight, like a wall, but they can be opened (and removed from the tabletop) – very much NOT like a wall. Which means, mid-move, it’s possible that you reveal enemy characters.
And some enemy characters might have “interrupt-your-opponent” type actions, such as overwatch fire.
With about 48 hours ’til deadline day, it’s really not the best time to admit “I forgot about doors” and I’m dreading the moment when I finally realise just how complicated having removeable doors is. It’s partly why a lot of games don’t bother with desctructive scenery – because it makes things really complicated!
Any way, here’s a quick test of how opening doors alters the line of sight for our characters, and how the game/app interrupts your turn, so that you place enemy pieces on the board as soon as they are revealed.
It’s also worth nothing that the addition of audio makes a massive difference! The whole point of the game is to keep the player focussed, not on the screen, but on the tabletop. So we’re going to need plenty of audio cues in here.
But that’s for again – this afternoon’s issue is to make the doors work properly!
Let's call it done.
Of course there are a hundred and one things I’d still like to do – and maybe, before the end of the year, I might just.
The audio leaves a lot to be desired (though it was only added as a last-minute thing because “hey, wouldn’t it be cool to add some atmosphere with some CB radio chatter?”). There are not victory conditions – the game just plays until the alien player decides to stop spawning Genestealers (and when the Marines are wiped out, there’s not much they can do except end each turn!).
But functionally?
Well, it’s a working game. It puts your tabletop miniatures onto a tablet. And it lets you play against opponents over the internet!
So while not every target was smashed in time for the end-of-competition deadline, I reckon there’s enough to say “I’m done”….. for now 😉
Development continues...
Utterly inspired by taking part in this challenge – thanks to all the Beasties who got involved – I’ve spent the last few days adding to and improving my game.
It’s been such fun (and, let’s be honest, a lot of hard work) that it’d be a shame to stop here. So I will continue the development on a separate project page, possibly even under a different title, as more features, characters, maps and weapons are added to the game….