Best non-chess game

Oscar Toledo G.
Av. Sta. Cruz del Monte 9-304
Cd. Satelite. Edo. de Mexico.
CP. 53110. Mexico.
biyubi@gmail.com
http://nanochess.110mb.com/

Judges' comments:

To build:

make toledo

To run:

./toledo

# NOTE: This requires X11 to run or modifications to use layer.c on
# Windows

Try:

./toledo

Selected Judges Remarks:

This two player game uses X11. The control keys can be configured by modifying the A,B,C and D macros at compilation.

After a quick splash screen the objective should be clear. There are Red, Green and Cyan tanks. A larger window can be made by altering the source early on, right before the code gets hard to follow.

Like Oscar’s previous winning X11 program for the 19th IOCCC, if you remove both the X11 include files and replace them with

#include "layer.c"

you ought to be able to compile and run this program on Windows.

Author’s comments:

    /=========\                 
    \==\   /==/                ||
       || ||   /====\  |\/=\   ||      //==\   ==\ |=\
       || ||       ||  ||  ||  ||  //  ||       =| | |
       || ||   //===|  ||  ||  ||=//   \\=\\   ==/ |=/
       || ||   ||  ||  ||  ||  || \\      ||   User's
       \===/   \\==//  ||  ||  ||  \\  \==//   Manual

This is a color X11 3D tank-game for two players, just compile and run it without arguments.

You will see briefly a tank spinning before each level.

Left half of the window shows the red player view and right half shows the green player view, the background will change to blue when the view goes inactive.

The objective is to chase and destroy the other player’s tank, there is also an aqua tank for testing your aim and getting extra points.

Caveat: You can shoot only 3 bullets at a time. Trick: You can fire faster if they explode on anything. Believe it or not, it has strategy!

When only one tank remains on the field, the level will advance. Don’t forget to destroy the aqua tank.

The playground is surrounded by mountains and each level is filled with random obstacles (pyramids and cubes).

The bars show players energy and score, each bar shows energy and indicates current player view (wider on the left), right part grows with every point.

Keys for player 1 (lowercase):

Keys for player 2:

Note: Numeric keys don’t work.

If you don’t like the keys assignment, you can change it on the the makefile.

PARENTAL ADVISORY WARNING:

This game is highly violent, when the tank explodes you can see the little stick man blowing in parts.

Not really, just kidding :D

PLATFORMS TESTED:

COMPLETE FEATURE SET:

FEATURES THAT PROGRAMMERS WILL FIND APPEALING:

OBFUSCATION TRICKS:

THE HISTORY OF THIS PROGRAM:

When I started working on this program, I figured that it would be easy to fit on the character limit, but I missed three things, the enormous X11 names, the unportable keycodes and my 2 KB of artwork.

Very hard coding did the first thing, in fact I worked out twenty-nine different versions, at one step I had four parallel versions with different characteristics removed (mountains, horizon line, score/status bars and explosions), I’ve managed to fit it all together!.

The second thing was solved using the makefile, it is under 160 bytes and you get adjustable keyboard. The greatest mistery on the earth is why X11 handles unportable keycodes to the user.

And finally, the third “Thing” was growing and growing, and growing, eating bytes for lunch… after endless rounds of crunching I obtained three-hundred seventy-eight bytes of artwork and guess what?, it doesn’t fitted.

So I had to integrate a decompressor, based on the space, tabulators and other non-counted characters.

The final program is composed of eight microfunctions, one is the core and does most of the hard work, other functions help doing the X11 things, explosion effects, 3-D calculations and viewing.

The source code was formatted as an cube using a specially written program, the reality is that the program is smaller and obfuscated of what is needed so the reformatting doesn’t exceeded the character limits, the crunched vectors were generated by another special program and the tank that surrounds this text was generated by yet another program.

Have fun!


Creative Commons License

© Copyright 1984-2012, Leo Broukhis, Simon Cooper, Landon Curt Noll - All rights reserved
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.