Posts about working with Unity3D.

Day 1 – An Excellent Beginning

Development time: 140 minutes.

I have to say this project is off to an excellent start. Unity makes throwing together a basic environment with some simple objects very easy, so I was able to get a play area with a crowbar, a couple of enemies and some scientists put together in very short order, and had enough time to make a reasonable start on the coding.

The crowbar moves around with mouse movement, the enemies make their way down the play area in hops and leaps until they get in range of a scientist, then they leap at him and spend the rest of their life attached to (i.e. hovering above) his head. The crowbar can be used to shove the enemies around too, which was not directly intended yet but does make the game basically playable.

Everything in the scene is pretty basic for now: the play area is a grey plane with a rectangular prism wall at the back (added to stop the scientists tumbling off the edge when the enemies run into them); the crowbar is a skinny rectangular prism in an attractive red; the enemies are squashed spheres, with a box collider as the sphere collider was making them roll; the scientists are simple cylinders.

If I’ve made good progress with the core gameplay by the weekend, I may have time to mess around in Blender and make some simple models, but that’s a whole 4 days away so I’d best not get ahead of myself – I certainly don’t need fancy models to make it work.

Goal for day 2: clobbering time!

I’ll aim to give the enemies health, give the crowbar the ability to take it away, and have the enemies spawning rather than just having a few at the top from the start. There should also be time enough to have the scientists spawn programatically, and have the game end when they’ve all been attacked. If I get through all that with time to spare, I’ll get some basic menu together, but that’s getting ahead of myself again.

Make a game in a week? Sounds insane. Probably is. Read on to discover why I would attempt such a thing.

Day 0 (i.e. before I started)

For my birthday this year I got myself something wonderful: Unity3D. I’ve just spent a week learning it, now I want to see what I can do!

For the month leading up to my birthday I decided to have a go at doing things the hard way and ended up with a decent cooperative block-stacking game with some addictive, annoying audio. That’s a subject for another post.

As development terrain goes, working with C++ and SDL was a bit like a jungle with some well-beaten paths – bring a machete and watch your step, but don’t worry too much about getting lost if you’re an experienced explorer. City folk had best bring a guide.

One of my main reasons for hacking my way through the development jungle was to get an appreciation for how far we’ve come and what’s being done for me by more modern tools. I think it worked.

Using Unity after doing everything by hand is like driving around a well-designed city. This is my first time visiting, and it’ll be a while before I can get around without a map, but everything is so well laid out that I’d have to be really trying hard to get lost. I’m also driving a hovercraft.

Since game dev is officially a hobby at this stage, I went for video tutorials as a low-stress way of getting a handle on the basics. I dashed through the interface intro, then jumped into a 3DBuzz tutorial series. Overall it was a little slow for my taste, because it isn’t targeted at experienced devs, but interesting enough to breeze through over a week of after-work and a weekend hours.

I’m sure there’s plenty more to learn, but Unity handles the fundamentals well enough that I already feel I know enough to put together a simple game without doing too much wheel-reinvention. Rather than just feel it, I’ve decided to put it to the test, which brings us to this week’s challenge:

In the spirit of a recent 48h game dev comp attended by a friend over the weekend of my birthday, I’m going to see what I can throw together in a few short hours. I have an estimated 8 hours of dev time over the work week, and another 8-16 hours on the weekend, for a grand total of about 20 hours.

For my simple game, I’ve picked one of my simplest game concepts: Science Crowbar. The player will control a crowbar, animated by the power of Science, and will be tasked with protecting scientists from invading Head Ticks that threaten to turn them into mindless zombies. Non-zombified scientists generate more science, allowing the crowbar to continue defending them. I suspect the current game club activity may have had an influence on this idea.

In practical terms, I am aiming by the end of Sunday to create a single game screen (plus menu) without worrying about story progression. Levels will have random enemy spawns with a faster spawn rate as the level number increases. Surviving scientists will continue to the next level, and extra scientists will be rescued between levels (implicitly, for now). There is a lot more I’d like to do with the concept, but I’ve pared it down to the core gameplay and basic difficulty progression for this initial prototype.

So, can I make a stable, simple game in a week with Unity? I’m about to find out.
Place your bets!

Update: check out my progress on Day 1