1oom

How to draw my own spaceship

So, you want your own doodles go pew pew at the enemies? Read on!

Make a template

First order of business is to get lbxview working. See here if you have trouble with it.

Start 1oom_lbxview_sdl1 (or _sdl2) and navigate to ships.lbx. You will see a small spaceship. Press Shift-Enter; lbxview does not display anything new but saves the pictures to z0.pcx. Now you have a suitable template with the correct palette. Press Ctrl-Esc to quit.

Pixel is a verb

Start your favourite pixeling tool. If you have none, try mtPaint.

Open z0.pcx and DRAW YOUR OWN SPACESHIP!

Color 0 is transparent; you may wish to edit the palette to make it stand out more. The edited palette is not included when the graphics are converted back to LBX format.

When finished drawing, save your work to z0.pcx. Copy the updated z0.pcx to z1.pcx, z2.pcx, z3.pcx and z4.pcx.

(Optional:) Edit the other pcx files to create animation.

The command line is your friend

Create myspaceship.txt with the following content:

0,"My spaceship yay"
2,ships.lbx,0x2a,myspaceship.bin

This will lead to replacing the first white banner huge ship (the triangular one with a white nose, or item 2a of ships.lbx) with your creation. Change the 2a with the hex number displayed in lbxview if you wish to replace some other ship instead.

Open a console/terminal, go to your 1oom directory.

Convert the graphics to LBX format: 1oom_gfxconv myspaceship.bin z*.pcx

Create the PBX file: 1oom_pbxmake myspaceship.txt myspaceship.pbx
Now you have a PBX file which contains your spaceship. The files myspaceship.txt, myspaceship.bin and z*.pcx are no longer needed (but keep them until you are sure the PBX file works). Note that using the PBX file does not alter the ships.lbx file itself in any way.

Let's see it!

Check it out in lbxview: 1oom_lbxview_sdl1 -file myspaceship.pbx
Press cursor right to view the animation.

Use it in game: 1oom_classic_sdl1 -file myspaceship.pbx
Does the ship fire lasers from the wrong places? That is a story for another day.

Done

... and that's how you replace graphics in 1oom. (How to actually draw a spaceship? Dunno.)