Game Development

Blog 712: Time-To-Crate

Three years have passed so quickly and yet so slowly, since I threw that first prototype together from random bits of script off the internet. I had destructible crates in that first prototype, but they just never quite felt necessary when I started the real project in earnest… until now.

Yes, I have finally added crates. Loot-containing, on-death-disintegrating crates. It didn’t take three whole years to implement crates, just that long to get around to it. Honest!

Progress Report

A. Level Generation: 7/8

Yes, level generator Mk.II is, for all intents and purposes, complete. Rooms can print varied floor and wall tiles, like my garage that prints raised walkways and roads. Rooms can print large single-tile decorations like oil reservoirs and floor fans and level exit lifts. Room types are fairly hard-coded but have a degree of flexibility; the garage will stretch all the way along an east or west wall, for example, while the corridor loop will contain a storage chamber in the middle if it’s big enough.

Of course I now need to construct more room types to slot into the system, and refine the ones that I have, but all the mechanisms are in place and everything seems to be slotting together nicely. (Except for a few sporadic, non-deterministic null reference exceptions that seem to be floating around…)

The final step is to add decorations that are smaller than whole tiles, the unit-sized pipes and computers and pillars and junk that will turn my sterile bunkers into living factories (and stop a roomful of enemies from unloading their cannons straight into you). I have the capacity for these on the pathing map, I just need to actually place them… and make them not overlap each other… and and and… This will probably require more re-engineering of the fundamental three-layered grid system. Fun times!

I've never actually been in the loading bay of a factory so I'm going on half-remembered bits of Deus Ex levels.
I’ve never actually been in the loading bay of a factory so I’m going on half-remembered bits of Deus Ex levels.

B. Level Navigation: 1/2

C. Item Systems: 4/4

D. Ability Systems: 2/2

E. Power-Ups: 3/3

Crates (feature E2) necessitated another import asset import pipeline. I have the whole object as one mesh, then a pile of individual chunks for it to shatter into on death — all of those need to be shaped and wired up to make a complete crate for use in the level generator (which then decides what to put inside it).

Crates and the disintegration thereof have sadly brought another more fundamental issue to the fore — that of scale. To Unity, my mechs are about two metres tall, but to me, they are closer to five. It’s all sort-of left-overs from my WC3 days — the mechs are the right geometric size in Milkshape to be normal-sized WC3 units, which I had to later reverse to get my real world scale factor (hence why it’s not a nice round number). This means that I’ve had to spend a lot of time retuning my masses and forces so that crates are not immovable walls but also do not go flying at the slightest touch.

I could scale everything to real world size on import, but when I tried this initially it just didn’t work. Milkshape operates “best” at a certain scale and so does Unity; it’s pretty much that if you’re too close in or too far out then the camera controls get muddy. I’ll take slightly wonky physics (that I don’t really rely on for gameplay) over my editors falling apart any day of the week.

F. Neutral Passive: 0/3

G. Enemies: 5/5 + 1

The last piece of the enemy puzzle was ramping up some of my dress-up options so that enemies would vary some of their chunks (feature G3). The primary blocker for this wasn’t a lack of mechanisms (I’ve actually had a basic variation capability in place since the unit type system first emerged from the swamp), but how to deal with variations on symmetrical elements like arms and legs. While it may be cool to have a totally randomised junk-mech now and again, that’s never going to fly as the norm — standard opponents need to be sensibly synchronised.

It’s not pretty, but when is my code ever pretty? As long as the mechs that come out the other side are beautiful, that‘s what matters. I have finally added a number of varied legs and arms and player cabins, and also slotted in a colour scheme randomiser to finish off this feature category. Huzzah!

Filling open chambers with enemies makes for easy combos, but when the spiderbots have stun guns then getting overwhelmed is inevitable.
Filling open chambers with enemies makes for easy combos, but when the spiderbots have stun guns then getting overwhelmed is inevitable.

H. Traps: 0/4

I. User Interface: 3/3 + 1

Progress

That’s 27 out of 36 features completed, which is slow progress considering I am now six weeks beyond the original festive break period where I was supposed to finish all these things in three weeks.

But crates! Glorious crates!

And you tell me...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.