Rock Paper Shotgunity, Part Four

By Jim Rossignol on December 5th, 2009 at 9:50 am.


It’s saturday, I’m awake, so it must be time for Build 02 of Rock, Paper, Shotgunity and the fourth post in our series about making a game from scratch. At the risk of repeating myself, I should explain: we’re making a game using the newly-free Unity game development tools. Why not catch up on the story so far and then read on? This week I said I’d be taking a look at some Unity Packages as well as continuing to refine Shotgunity in general following the release of Build 01 last saturday. So how did that go? Find out after the jump.


After I managed to cram so much (well, relatively speaking…) into Build 01 I had certain expectations for week 2. Great Things were required to top that warm glow of satisfaction earned in the first week. But despite (or perhaps because of) my grand plans, I’ve been buried in the bowels of Shotgunity’s code for much of the week. Perhaps that’s not surprising. What is surprising is that it’s been fun.

The RPS forumites (I really need a name for this splendid gang incidentally, these crewmen of the RPS Reader-Ship… ShotgUnitiers?) are continuing to provide crucial support for the project. Tinus’ player control script grows in functionality daily and we now have a far more flexible and powerful AI behavior script thanks to MikeG. But I haven’t been leaving all the coding tasks to these stalwarts. I’ve been coding switches. Clever, puzzle-facilitating switches sure to confundle and befuse even the brainiest reader who attempts Build 02…


I’ve been turning to the Unity Forums and Scripting Reference a lot this week in an effort to create the framework for at least one part of our three-pronged Puzzle Trident – the Rock. You’ll remember from Build 01 that although the Rock was present, it didn’t actually do anything. Well it does now. I’ve been amazed at how productive a complete coding noob can be with just a little reading of the Script Reference, some experimentation with the tutorial scripts as a basis, and – crucially – judicious use of the Search function on the Unity forum. You’ll notice that in Build 02 the Rock is now a vital tool for successful navigation of the mazes.

Using the references and resources provided by Unity I’ve made trigger boxes that react when the Rock is placed inside them, firing off signals to doors, sliding blocks and other surprises scattered around the levels. I’ve was also able (eventually) to make a Rock Respawning system. The Rock now disappears if you leave it alone for more than 20 seconds. Let go of it and timer begins to tick down, grab it again and the timer resets. If you’re too late, Rock respawner machines all over the level become active allowing you to create a new Rock, but importantly only one rock in the scene can be alive at a time. Does that sound pretty standard again? Ah well, maybe it does, but it seemed like some fairly sophisticated coding to me at the time, I whooped for an hour when I finally cracked it. Remember all this has been done by someone with absolutely NO coding experience. I’m not labouring this point simply to blow my own trumpet, but to illustrate how possible it would be for you to do this too. Ok, so the Shotgunitiers (Forumulators?) have been a huge and indispensable help, but I’ve been deliberately leaving some stuff out of the RPS forum, asking questions of the Unity resources to see if I could achieve things just as the ‘regular’ newbie would. Amazingly, I could.


But where has this left my other aims for the week? Sadly on something of a back-burner. I’m still determined to take a closer look at the Locomotion System, especially seeing how the Forumulators (Gunitites?) have been creating some cracking art assets. (If you haven’t seen it, the Tiki-Keiron is worth a visit to the forum all on its own… it’s like HE’S THERE) and now that I have at least one third of our puzzle-enabling elements in place, I can start paying more attention to art, sound and all the other things that are going to make this a game, rather than an experiment in trial and error coding.

Build 02 is now available on the forums, along with the Project files themselves so budding Unity users can see Shotgunity as I do, in all it’s mid-development nakedness. Why not pop in and see if you can contribute?

__________________

« | »

, , .

11 Comments »

  1. Taillefer says:

    You inspired me enough to start messing around with Unity. I’m very slowly working through the FPS tutorials and even at my snail-pace I’m amazed how quickly things can come together. I even have an idea in my head of what I want to do which doesn’t seem too ambitious, but it’s something that can scale up in complexity easily once I’m more confident.

    I’m probably far too unreliable to contribute anything to Shotgunity apart from words of encouragement. So, keep up the good work!

    • JB says:

      Taillefer, exactly the same situation here. I’m noodling around in the tutorials, enjoying it immensely. I too have a basic plan, and I too am probably far too unreliable (not to mention inexperienced) to contribute at the moment.

      Keep at it, ShotgUnitieriterers!!

    • pepper says:

      Yeah, unity is very easy to work with, making a tank game with it.

  2. Petethegoat says:

    Bug Report, Away!

    If you switch to the shotgun whilst holding the rock, the rock just floats where ever you were holding it.

    Otherwise, looking good. You really, desperately, need some textures though. I might contribute some in a bit.

  3. DMJ says:

    So you might describe it as a sort of… Weighted Companion Rock?

  4. Rob Maguire says:

    Looks good. I would suggest perhaps a suicide button, though. The way it is now, when you glitch through the walls you must quit and reload the program, or fall forever. It makes testing the later parts of the level slightly more difficult, as you have to be _perfect_ to get to them..

  5. Taillefer says:

    Oh yeah, in what I’m sure is just an homage to Thief, one can jump onto the rock-o-matic, then onto the walls and avoid the puzzles and monsters.

  6. InfiniteUnity3D says:

    Wow! I’ve been watching this for a while and it’s really coming together. I can’t wait to see how this turns out!