LDraw: Making blocks outta nothing at all

Welcome to day 3 of “International Operation Block Week”!

Monday I told you about the background of the remake, showing the many attempts I made before I worked out a graphical style. Yesterday I showed you how I analysed the original arcade hit to make sure I could replicate the gameplay. And today, we’re talking blocks.

As I mentioned on Monday, I tried a few ideas before deciding on LDraw (& its associated programs) as a method of doing the graphics. Today I’ll show you a few of the programs in the LDraw suite, and some tricks I learnt to speed up the process of making virtual models.

The first step in starting this LDraw process, is visiting the LDraw site, and downloading the installer. (I’m speaking Windows PC language here, but there are ports for Mac & Linux too.) Once you’ve got the package, doubleclick the file, and install all the various parts. It seems pretty complex, but you’ve got to remember that LDraw is made up of many small free programs (made by fans) that work together.

Once you’ve got your software installed, you can open MLCad, and start finding, colouring, rotating, placing & combining blocks. I could type 50 posts on how to use this program, but really, it’s just something you’ll have to play with yourself. Discovery = Fun, remember!

MLCad - used for putting together virtual Lego models

MLCad - used for putting together virtual Lego models

In the screenshot above you’ll see:

  • Left hand side: The Parts library
  • Right hand side: Front, Left, Top & 3D views of what you’re building
  • Toolbars: For building, colouring, placing, adjusting the pieces

One thing I quickly found, was finding a particular piece I needed was really difficult using the parts finder, unless I knew it’s name. So – I found a great PDF of all the parts, printed it out and it’s now my parts reference guide.

Hundreds & hundreds of parts - now easy to find...

Hundreds & hundreds of parts - now easy to find...

For example: Operation Block has a helicopter enemy. The front of the chopper has a transparent section, and that part needs to be found, in order to build the model.

If I was looking for the piece via the parts tree in MLCad, it would be pretty difficult. But flicking through my printed catalogue made it much easier…

Need a transparent canopy for a military helicopter?

Need a transparent canopy for a military helicopter?

Now, if you’re going to have a game with Lego-style characters, you need “Lego people”. Or – as I soon discovered – “minifigs”. Yes, that’s the proper name for them. Now, manually putting a minifig together in MLCad would take a while, as there are quite a few pieces that need to be accurately combined.

Luckily – you don’t have to worry about that, as it has a kind of “wizard” that helps you quickly build minfig characters…

MLCads minifig builder

MLCad's minifig builder

That still doesn’t help in quickly identifying the parts; so once again I check my trusty printed parts catalogue, under the “minifig” section. Here I can easily find the parts that are closest to the various characters in the original Operation Wolf game.

Minifig parts in the Ldraw parts catalogue

Minifig parts in the Ldraw parts catalogue

Whether I’m constructing a minifig (person), vehicle or building, there comes a time when I’m happy with the model. At this stage, it’s time to see how the model looks when rendered.

L3P is a program that sets up the model with lights & a camera, before it gets rendered. Unfortunately, L3P asks you to type in all sorts of scary code to make it work, so I use another program, L3PAddon which gives me nice pretty boxes and options to tick instead.

L3PAddon is used to add lighting, and adjust the camera angles

L3PAddon is used to add lighting, and adjust the camera angles

Once I’ve set the scene up in L3PAddon, I just press “render” and it sends the scene to Povray. Within a few seconds, I get my model with all the lovely lighting, shading and reflections you might expect.

Or – if I’ve stuffed it up – I might get a purely brown screen because I stupidly put the “camera” inside the left leg of a brown Lego minifig. Anything’s possible…

And heres one we prepared earlier...

And here's one we prepared earlier...

In this case, I did manage to render my model properly, and you can see above one of the “silver” enemies from the game. They have both an Uzi machinegun to shoot, and a knife to throw. With those two different attacks, plus walking and jumping movements AND the ability to get shot, fall over and get back up again… this character was a nightmare to animate.

Ahh, animation! The next step.

When you play a modern Lego themed game, the characters are all 3D, and move/bend/animate in real time. The computer just needs to know “move the left leg up a bit” and it does it. But because I’m doing an old-school 2D sprite based game, I need to make each frame of animation seperately. Its the same way something like the Simpsons cartoons or a Wallace & Grommet film is put together.

GIMP - a powerful, yet free Graphics editing program

GIMP - a powerful, yet free Graphics editing program

Once I’ve created a group of frames (as BMP files, so we don’t lose any quality) eg “Brown man walking left”… I open up GIMP (see above) with all the frames as separate layers. I then resize the object to the correct size (using the sizes I worked out yesterday when studying the original game) and save it as a GIF file. Why a GIF? Because they’re made for animation – and – they work well in Game Maker.

Game Maker?
It’s the programming tool I’m using to make everything “work”.

And that’s a story.. for tomorrow.


Hope you enjoyed Day 3 of “International Operation Block Week”.

…well, I can’t give away everything at once. 😉

PS: If you’re excited by Operation Block, please consider giving it a “digg” or a “reddit“. Thanks!

Disclaimer: Operation Block is a freeware, fan tribute game being developed for Windows PCs. There’s no connection whatsoever to Taito, Lego or Traveller’s Tales. And it won’t be ready till Christmas 2010. At the earliest.

One Response to LDraw: Making blocks outta nothing at all

  1. woh I enjoy your posts , saved to my bookmarks ! .

Leave a Reply

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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: