By James Carey on November 28th, 2009 at 10:17 am.

Oooh exciting! The first ever build of what critics are literally calling “that thing Carey’s made” is here. Rock, Paper, Shotgunity is ALIVE!
Those who don’t read RPS every day might not have noticed we’re making a game using the newly-free Unity development suite. So to explain: twice a week for the next two months I’ll be posting about my experiences with the tools. This first week my aim was simply to get to grips with the suite, create a test environment and get one of our three super-duper weapons working. How did that go? Find out below.
Well it turns out that aim was pretty humble. Unity Technologies are right to be proud of the suite’s visual nature, it’s ease of asset integration and rapid prototyping capabilities. I started the week with a blank canvas and a head full of partially-digested tutorials and I’ve been amazed by how quickly I’ve been able to produce something that works. Now bear in mind I’m coming to this completely fresh, with no prior coding experience and only the gentlest tickling with a .02 brush of the modding scene, but lord help me if I haven’t actually got something playable already.

Now clearly this first build is no work of art – or even much craft – but it does demonstrate that the complete novice can make headway very rapidly using the Unity tools. It’s been possible because Unity does a fantastic job of managing assets, importing from external tools with zero fuss, taking the assets you’re producing and updating your game scenes on the fly. For example, as well as not being a coder, I’m also not a modeler (you wouldn’t believe the number of things I’m not) so I’ve been using Google Sketchup to create all my geometry. Sketchup is the Lego of the internet, designed from the outset to demystify the 3D modeling world and put creative power in the hands of newbies. It’s a perfect companion to Unity in this sense, there’s a good mirroring of approach going on – powerful tools of digital creativity being rethought from first principles. Using Sketchup and a great lightmapping plugin called LightUp I’ve been able to forge complex and efficiently lit levels from nothing in minutes, export them over to Unity in seconds and be running around in these new environments before the tea’s cool enough to drink. Unity’s perfectly capable of generating environments itself of course (with built in terrain and lighting tools which I’ll talk more about in future posts) but it’s in combining these external apps and internal tools where Unity really begins to show its power.
Even so – despite it’s user friendliness and because I’m a dullard – time and again this week I’ve started looking for a third-party solution to a need before discovering that Unity could do it all for me. A simple example would be that I started generating bumpmaps for my textures using nVidia’s bumpmapping plugin for Photoshop before realising that Unity could create them automagically in each textures’ properties. A more complex example would be animating the baddies and the shotgun, which at first I struggled to do with Blender before finding things were far, far easier with Unity’s built in animation tool… Clearly, picking the right tool or external app for the job is going to be the name of the game as the project rolls on…

Now, at this point you might be looking at the simple maze-like nature of the first build and thinking that in spite of the above lyrical wax thing look a little basic, but that’s by choice not necessity. I began by creating much more complex scenes (see shot below) and had produced a great chunk of virtual world in very little time before realising it just wasn’t needed – or helpful – at this stage. I was putting on the sequined-frock before I’d learned how to dance or even what the dance would be.. But then that’s the point. By making things so quick and painless Unity frees you from the agony of investment, it’s OK to just experiment, to monkey around and rapidly iterate until the shape of things begin to form. It’s pure creative exploration, it’s play. It’s an exhilarating experience for a newcomer, the fertile plains of creative potential are rolling out in front of me and they seem suddenly, surprisingly, and wonderfully accessible.
A more detailed discussion of the development process is going on in the forums where, rather pleasingly, scores of creative RPSites more capable than I are coming together in a great communal development hug to produce art, code and ideas for the Shotgunity project. Why not join them?
This ongoing series is being written by RPS comrade in righteousness, James Carey. Responsibility for developing the RPS game lies largely with him, although we’re all going to be poking our fingers into the fatty underbelly of his design. It’s a dirty job, etc.



28/11/2009 at 10:50 Barton says:
Looks like you got some script errors at the bottom. Did you decide on C#, Javascript or Boo?
28/11/2009 at 10:55 James Carey says:
javascript. Yeah those errors are mostly from stuff being called with no receiver. Next week’s build will be cleaner…
28/11/2009 at 11:26 TheSombreroKid says:
you’ll regret that, you should’ve went with c#
28/11/2009 at 11:50 Carra says:
Ah, code wars are religious wars.
I’m expecting a “but javascript is the best” post in 3 2 1…
28/11/2009 at 12:06 HidesHisEyes says:
grumble grumble c++
28/11/2009 at 12:31 Susan says:
hurp durp Assembly <3
28/11/2009 at 12:37 sana says:
U-UnrealScript…
28/11/2009 at 13:10 El Stevo says:
Python!
28/11/2009 at 13:14 Taillefer says:
Anaconda!
28/11/2009 at 13:34 Mithrandir0x says:
Basic all the way!!
28/11/2009 at 14:32 DMJ says:
English.
28/11/2009 at 15:07 Psychopomp says:
Adobe Director
28/11/2009 at 16:27 Wulf says:
Lua!
Nothing better than having a parser that’s smarter than the person doing the debugging, 99 per cent of the time. It saves me so much trouble when people find unexpected things in stuff wot I wrote in Lua, as Lua error messages are incredibly helpful, so much more so than any parser I’ve ever used.
Lua’s parser could probably pass the bloody turing test.
28/11/2009 at 18:07 Matthew says:
Any of the Unity languages get the job done. For the record, all of the Blurst stuff is JavaScript.
28/11/2009 at 23:22 WilPal says:
Who cares? It all depends on the coders needs/experience level.
I personally believe C++ is the most powerful language, as is the case with many other people.
Would i use C++?
No. I hate the damm thing. I’d much rather use simpler languages which fall in line with my needs than spend hours just creating a window/viewport in C++.
Language wars are silly.
29/11/2009 at 00:13 Matthew says:
In the specific context of Unity I mention our use of JavaScript because there is misinformation out there that C# is the only way to fully utilize all of Unity’s features/APIs. There are three languages to choose from in today’s Unity: JavaScript, C#, and Boo. All of them have the same compiled performance and full access to both Unity’s API and Mono’s .NET libraries.
But yeah, in a wider discussion language evangelism is quite odd! It devolves into semantics and assumed beliefs about what is important and why (ie, what are you defining as “powerful” when you say C++ is powerful? That’s rhetorical, by the way, please don’t answer!)
29/11/2009 at 00:29 jsutcliffe says:
I am very curious about the idea of using Javascript for this kind of programming — I wouldn’t have though it was up to the task. Does Unity play nicely with JS libraries like Dojo, Ext or jQuery?
29/11/2009 at 01:17 Adam Bloom says:
Doubtfully.
29/11/2009 at 07:31 Weylund says:
I once took ownership a three-year-old project written entirely in Javascript. It actually turned out rather well, considering. Didn’t use jQuery. Just plain Javascript and SQL, run through WSH.
So, yes, anything is possible if you put your mind to it.
That said, I found the Javascript used in Unity to be very straightforward and useful.
30/11/2009 at 03:32 Matthew says:
jsutcliffe: “JavaScript” is a bit of a misnomer. Unity’s JavaScript is their own ECMAScript implementation that compiles to .NET CLR bytecode (Unity’s scripting languages are all executed by Mono’s runtime). It’s much more like ActionScript or JScript than browser-based JavaScript. Unity deliberately chooses to call it JavaScript, rather than something like “UnityScript”, to convey ease of use and portability. I actually think that’s a mistake; you can very rarely paste *anything* from the web JavaScript world and have it do anything useful (if it even compiles).
28/11/2009 at 11:31 JeCa says:
wow, I’m amazed you actually got something working from scratch within this time period. The one main problem as I see it right now is, interestingly enough, garbage collecting. Or the lack thereof. Or something. Basically, something I’m not sure you see when jumping in to test it and then jump out again, is that gets a lot slower quite quickly, and if ran for 20 minutes strait almost becomes unplayable.
You’re Probably already aware of this, and I know that optimisation neither is nor should be a priority now. Just throwing it out there.
28/11/2009 at 12:10 James Carey says:
Yeah, annoying isn’t it? I’m sure I’ll work out why it does that at some point…
28/11/2009 at 17:36 LionsPhil says:
@JeCa: Fixing memory leaks is not “optimisation”. It is “bugfixing”. You do it early, or it’ll be impossible to track down by the time you get around to it.
28/11/2009 at 11:32 HexagonalBolts says:
I’m very impressed by the scale of this project
Could you possibly point us fellow new-comers in the direction of some of the tutorials you used to get this working from scratch?
28/11/2009 at 12:17 James Carey says:
‘from scratch’ is a little generous, most of the scripts i’m using are from the tutorials, albeit messed around with to get them doing what I want.
http://unity3d.com/support/resources/tutorials
http://www.reddit.com/r/unity_tutorials/
28/11/2009 at 22:16 HexagonalBolts says:
Aaah, thanks.
By ‘from scratch’ I more meant your original lack of coding/creating skillz than the components of the level itself.
28/11/2009 at 11:37 Taillefer says:
This is pretty inspiring, I must say. I start projects about various things all the time, but rarely finish. It’ll be interesting to follow how well everything goes with Unity. Then I can start and abandon something in that too, hurrah!
28/11/2009 at 11:48 Carra says:
Interesting project.
I’ll see if there’s any way I can help with some code.
28/11/2009 at 11:51 Miles of the Machination says:
Impressive, especially for the time it’s taken, and your experience. I might just check it out for myself. However, you do realise that shotguns must have zombies, I suggest Zombies for Zombies Sake, I’m sick of all of these contrived explanations for zombies.
28/11/2009 at 22:21 Bret says:
Freaking zombies.
Always have to deal with them this time of year. Eat all the crops if you don’t dust for them.
28/11/2009 at 12:29 Lewis says:
This is actually very interesting indeed. I knew Unit was flexible and user-friendly, but the stuff you’re talking about makes it sound basically easier than – well – modding the original Quake. The Google Sketchup compatibility and auto-bump-mapping capability are just stunning things to have in an engine front-end.
28/11/2009 at 12:41 Mattaustin66 says:
Cool..
28/11/2009 at 12:45 Mattaustin66 says:
Once the game is more complete, see if you can bullshit the Daily Mail into running a story..
Your son is hooked on this game, and has mugged a bunch of pensioners or something..
28/11/2009 at 12:57 Rakysh says:
*approval*
however…
my mouse sensitivity was like unplayably high. How hard is it to put options in? If they’re too tricky, can I suggest just dialling it down a little bit?
28/11/2009 at 13:22 James Carey says:
Ah, that might be something to do with not calculating input per frame against a fixed time. in other words if you get a faster framerate on your rig you can move faster. Fixed pretty easily by * the speed with time.deltatime (probably).
28/11/2009 at 13:27 Heliosicle says:
from scratch you say?
i’ve tried fiddling about with stuff, but it seems ill only ever be good at playing games rather than make em.
28/11/2009 at 14:24 Digit says:
You should pop into the Unity IRC, if you want help with anything it’s a great place to ask any question, no matter how simple you may think. Ping me too, Digitalos.
28/11/2009 at 14:48 Srsly says:
Write it in INTERCAL and i’ll built a shrine for you, your ancestor and your children to follow.
28/11/2009 at 16:30 AsCagnel says:
Brainfuck: +++–+++-;
29/11/2009 at 07:55 Dreamhacker says:
Mindscrew: ***a = ***b;
28/11/2009 at 16:33 Camilo says:
The LightUp plugin for SketchUp is 149 dollars :S
Anyway, I love this series of articles, inspiring!
28/11/2009 at 17:34 LionsPhil says:
Unlambda, you cretinous amateurs.
28/11/2009 at 19:13 Ziv says:
I would’ve tried doing something like that if I knew anything about 3d modelling, I tried it once and came up with crap…
28/11/2009 at 19:46 Jason Lefkowitz says:
The squeaky little “I regret nothiiiiiiiiiiiiiiiiiiiiiiiing!” when you fall into a pit is GOLDEN.
29/11/2009 at 00:36 jsutcliffe says:
“I say we take off and shotgun the site from orbit. It’s the only way to be sure.”
Jebus. That’s quite a weapon. XD
29/11/2009 at 03:55 Mad Doc MacRae says:
Is it pronounced “Shot-gewnity”? Cuz I keep rereading the title and think it’s Something Awful related.
30/11/2009 at 03:29 Wulf says:
I had that problem, too! Guh.
And since I absolutely despise Something Awful with every fibre of my being (really, if you ever cared to convince someone that humanity needs to be exterminated, introduce them to Something Awful and they will warm to the notion), I had to train myself to read it differently.
I now read it as Rock, Paper, Shotgunnity, which is far more entertaining to say aloud, anyway!
30/11/2009 at 15:06 LionsPhil says:
Dear Gods, nobody ever let Wulf see 4chan, then.
30/11/2009 at 15:15 Psychopomp says:
Excuse me, but WTF, D&D is tits.