Format and typo fix 2011/toledo/README.md
This commit is contained in:
1 parent
42ef81fece
commit
2f6c0589d6
1 file changed
+64
-65
+64
-65
@@ -17,7 +17,8 @@ make
|
|||||||
./toledo
|
./toledo
|
||||||
```
|
```
|
||||||
|
|
||||||
NOTE: This requires X11 to run or modifications to use layer.c on Windows.
|
NOTE: This requires X11 to run or modifications to use [layer.c](layer.c) on
|
||||||
|
Windows (see below).
|
||||||
|
|
||||||
## Try:
|
## Try:
|
||||||
|
|
||||||
@@ -28,7 +29,7 @@ echo "Do or do not. There is no try."
|
|||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|
||||||
This two player game uses X11. The control keys can be configured by
|
This two player game uses X11. The control keys can be configured by
|
||||||
modifying the A,B,C and D macros at compilation.
|
modifying the `A`, `B`, `C` and `D` macros at compilation.
|
||||||
|
|
||||||
After a quick splash screen the objective should be clear. There
|
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
|
are Red, Green and Cyan tanks. A larger window can be made by altering
|
||||||
@@ -45,6 +46,7 @@ you ought to be able to compile and run this program on Windows.
|
|||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|
||||||
|
```
|
||||||
/=========\
|
/=========\
|
||||||
\==\ /==/ ||
|
\==\ /==/ ||
|
||||||
|| || /====\ |\/=\ || //==\ ==\ |=\
|
|| || /====\ |\/=\ || //==\ ==\ |=\
|
||||||
@@ -52,6 +54,7 @@ you ought to be able to compile and run this program on Windows.
|
|||||||
|| || //===| || || ||=// \\=\\ ==/ |=/
|
|| || //===| || || ||=// \\=\\ ==/ |=/
|
||||||
|| || || || || || || \\ || User's
|
|| || || || || || || \\ || User's
|
||||||
\===/ \\==// || || || \\ \==// Manual
|
\===/ \\==// || || || \\ \==// Manual
|
||||||
|
```
|
||||||
|
|
||||||
This is a color X11 3D tank-game for two players, just compile
|
This is a color X11 3D tank-game for two players, just compile
|
||||||
and run it without arguments.
|
and run it without arguments.
|
||||||
@@ -73,7 +76,7 @@ extra points.
|
|||||||
When only one tank remains on the field, the level will advance.
|
When only one tank remains on the field, the level will advance.
|
||||||
Don't forget to destroy the aqua tank.
|
Don't forget to destroy the aqua tank.
|
||||||
|
|
||||||
The playground is surrounded by mountains and each level is
|
The <strike>battle</strike>playground is surrounded by mountains and each level is
|
||||||
filled with random obstacles (pyramids and cubes).
|
filled with random obstacles (pyramids and cubes).
|
||||||
|
|
||||||
The bars show players energy and score, each bar shows energy
|
The bars show players energy and score, each bar shows energy
|
||||||
@@ -98,8 +101,8 @@ Keys for player 2:
|
|||||||
|
|
||||||
> Note: Numeric keys don't work.
|
> Note: Numeric keys don't work.
|
||||||
|
|
||||||
If you don't like the keys assignment, you can change it on the
|
If you don't like the keys assignment, you can change it in the
|
||||||
the makefile.
|
Makefile.
|
||||||
|
|
||||||
### PARENTAL ADVISORY WARNING:
|
### PARENTAL ADVISORY WARNING:
|
||||||
|
|
||||||
@@ -110,7 +113,7 @@ Not really, just kidding :D
|
|||||||
|
|
||||||
### PLATFORMS TESTED:
|
### PLATFORMS TESTED:
|
||||||
|
|
||||||
* openSuSE 10.2 x86-32, X11R6 1024x768 32-bits color.
|
* openSUSE 10.2 x86-32, X11R6 1024x768 32-bits color.
|
||||||
* Fedora Core 8 x86-64, X11R6 1280x1024 32-bits color.
|
* Fedora Core 8 x86-64, X11R6 1280x1024 32-bits color.
|
||||||
* Fedora Core 11 x86-64, X11R6 1024x768 32-bits color.
|
* Fedora Core 11 x86-64, X11R6 1024x768 32-bits color.
|
||||||
* Fedora Core 14 x86-64, X11R6 1024x768 32-bits color.
|
* Fedora Core 14 x86-64, X11R6 1024x768 32-bits color.
|
||||||
@@ -119,11 +122,11 @@ Not really, just kidding :D
|
|||||||
|
|
||||||
* Multiplayer out of the box.
|
* Multiplayer out of the box.
|
||||||
* Totally self-contained, no external files.
|
* Totally self-contained, no external files.
|
||||||
* Fast-furious action at 29.97 frames per second.
|
* Fast-and-furious action at 29.97 frames per second.
|
||||||
* Just as the movies, 16:9 aspect-ratio.
|
* Just as the movies, 16:9 aspect-ratio.
|
||||||
* Beautiful mountains landscape plus horizon line :)
|
* Beautiful mountains landscape plus horizon line :)
|
||||||
* Tanks and bullets exploding as wires with weird physics.
|
* Tanks and bullets exploding as wires with weird physics.
|
||||||
* Tanks backoff when firing.
|
* Tanks back off when firing.
|
||||||
* There is an infinite number of levels.
|
* There is an infinite number of levels.
|
||||||
* Always different levels.
|
* Always different levels.
|
||||||
* Animated intro.
|
* Animated intro.
|
||||||
@@ -131,27 +134,24 @@ Not really, just kidding :D
|
|||||||
|
|
||||||
### FEATURES THAT PROGRAMMERS WILL FIND APPEALING:
|
### FEATURES THAT PROGRAMMERS WILL FIND APPEALING:
|
||||||
|
|
||||||
* Works both with x86-32 and x86-64 processors.
|
* Works both with 32 and 64-bit CPUs.
|
||||||
* Double buffered, portable to any X11 with 24/32-bit color.
|
* Double buffered, portable to any X11 with 24/32-bit color.
|
||||||
* Memory-hungry as must be any 3-D program, uses a 256 MB
|
* Memory-hungry as must be any 3D program; uses a 256 MB array.
|
||||||
array.
|
* Total and absolute irreverent coding style, so it generates a lot of warnings
|
||||||
* Total and absolute irreverent coding style, so it generates
|
when compiled.
|
||||||
a lot of warnings when compiled.
|
* It can take several minutes to compile (known culprits: Fedora Core 11-14 on
|
||||||
* It can take several minutes to compile (known culprits:
|
x86-64 512 MB).
|
||||||
Fedora Core 11-14 on x86-64 512 MB)
|
* It is written in the only true C: K&R, and no, that doesn't mean
|
||||||
* It is written in the only true C: K&R, and no, it not means
|
|
||||||
Katherine & Rose.
|
Katherine & Rose.
|
||||||
* Vectorial scalable graphics, do you want a bigger
|
* Vectorial scalable graphics, do you want a bigger viewport? Change variables M
|
||||||
playfield? change variables M & N.
|
`&` `N`.
|
||||||
* Half of the program is formatted as 3-D cube, view with
|
* Half of the program is formatted as 3D cube. View with tabs at 8 columns and a
|
||||||
Tabs at 8 columns and a square font.
|
square font.
|
||||||
* The other half of the program is unprintable source code,
|
* The other half of the program is unprintable source code, so no typing from
|
||||||
so no typing from paper, you have to write a converter of
|
paper, you have to write a converter of tabs and form-feeds to its C escaped
|
||||||
tabs and formfeeds to its C escaped forms.
|
forms.
|
||||||
* No text, so this program can be used and understood easily
|
* No text, so this program can be used and understood easily in any country.
|
||||||
on any country.
|
* This program is highly ecological, it sleeps when it is not doing anything.
|
||||||
* This program is highly ecologic, it sleeps when it is not
|
|
||||||
doing anything.
|
|
||||||
* Virtual world with its own physics laws.
|
* Virtual world with its own physics laws.
|
||||||
* When closing the window it will show an X11 error :P
|
* When closing the window it will show an X11 error :P
|
||||||
|
|
||||||
@@ -160,9 +160,10 @@ Not really, just kidding :D
|
|||||||
* Loop code included inside loop test.
|
* Loop code included inside loop test.
|
||||||
* Function arguments used as variables.
|
* Function arguments used as variables.
|
||||||
* Operators used freely.
|
* Operators used freely.
|
||||||
* Precalculated values to save bytes.
|
* Pre-calculated values to save bytes.
|
||||||
* Uses the +++, +- and *+ undocumented C operators :P
|
* Uses the `+++`, `+-` and `*+` undocumented C operators :P
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
....,,,,---++++++--,,..
|
....,,,,---++++++--,,..
|
||||||
.,,,....... .$@@@@@@@@@@@@$$@@@@@@@@@@@@@@#+
|
.,,,....... .$@@@@@@@@@@@@$$@@@@@@@@@@@@@@#+
|
||||||
@@ -185,53 +186,51 @@ Not really, just kidding :D
|
|||||||
..,+++=+-,.. .@. +=+
|
..,+++=+-,.. .@. +=+
|
||||||
.,-+++++,@@==
|
.,-+++++,@@==
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
### THE HISTORY OF THIS PROGRAM:
|
### THE HISTORY OF THIS PROGRAM:
|
||||||
|
|
||||||
When I started working on this program, I figured that it would
|
When I started working on this program, I figured that it would
|
||||||
be easy to fit on the character limit, but I missed three
|
be easy to fit on the character limit, but I missed three things: the enormous
|
||||||
things, the enormous X11 names, the unportable keycodes and my
|
X11 names, the non-portable key codes and my 2 KB of artwork.
|
||||||
2 KB of artwork.
|
|
||||||
|
|
||||||
Very hard coding did the first thing, in fact I worked out
|
Very hard coding did the first thing. In fact I worked out twenty-nine different
|
||||||
twenty-nine different versions, at one step I had four
|
versions and at one step I had four parallel versions with different
|
||||||
parallel versions with different characteristics removed
|
characteristics removed (mountains, horizon lines, score/status bars and
|
||||||
(mountains, horizon line, score/status bars and explosions),
|
explosions) but I've managed to fit it all together!
|
||||||
I've managed to fit it all together!.
|
|
||||||
|
|
||||||
The second thing was solved using the makefile, it is under
|
The second thing was solved using the Makefile: it is under
|
||||||
160 bytes and you get adjustable keyboard. The greatest
|
160 bytes and you get adjustable controls. The greatest
|
||||||
mistery on the earth is why X11 handles unportable keycodes to
|
mystery on the Earth is why X11 gives non-portable key codes to
|
||||||
the user.
|
the user.
|
||||||
|
|
||||||
And finally, the third "Thing" was growing and growing, and
|
And finally, the third "Thing" was growing and growing, and
|
||||||
growing, eating bytes for lunch... after endless rounds of
|
growing, eating bytes for lunch... after endless rounds of
|
||||||
crunching I obtained three-hundred seventy-eight bytes of
|
crunching I obtained three-hundred seventy-eight bytes of
|
||||||
artwork and guess what?, it doesn't fitted.
|
artwork and guess what? It doesn't fit.
|
||||||
|
|
||||||
So I had to integrate a decompressor, based on the space,
|
So I had to integrate a decompressor based on the space, tabulators and other
|
||||||
tabulators and other non-counted characters.
|
non-counted characters.
|
||||||
|
|
||||||
The final program is composed of eight microfunctions, one is
|
The final program is composed of eight micro-functions: one is the core and does
|
||||||
the core and does most of the hard work, other functions help
|
most of the hard work and the other functions help do the X11 things, explosion
|
||||||
doing the X11 things, explosion effects, 3-D calculations and
|
effects, 3D calculations and viewing.
|
||||||
viewing.
|
|
||||||
|
|
||||||
* K() - 3-D transformation
|
* `K()` - 3D transformation
|
||||||
* s() - Rendering
|
* `s()` - Rendering
|
||||||
* b() - Line color selection
|
* `b()` - Line color selection
|
||||||
* G() - Explosion animation
|
* `G()` - Explosion animation
|
||||||
* g() - Moves 3-D object backward and forward
|
* `g()` - Moves 3D object backward and forward
|
||||||
* F() - Collision detection
|
* `F()` - Collision detection
|
||||||
* T() - Core (also known as main loop :D)
|
* `T()` - Core (also known as main loop :D)
|
||||||
* main() - Initialization and uncruncher, what a common name!,
|
* `main()` - Initialization and 'uncruncher', what a common name!;
|
||||||
C programs should start in the cool() function :).
|
C programs should start in the cool() function :).
|
||||||
|
|
||||||
The source code was formatted as an cube using a specially
|
The source code was formatted as a cube using a specially written program. This
|
||||||
written program, the reality is that the program is smaller and
|
program is smaller and obfuscated what is needed so the reformatting doesn't
|
||||||
obfuscated of what is needed so the reformatting doesn't
|
exceeded the character limits. The crunched vectors were generated by another
|
||||||
exceeded the character limits, the crunched vectors were
|
special program and the tank that surrounds this text was generated by yet
|
||||||
generated by another special program and the tank that
|
another program.
|
||||||
surrounds this text was generated by yet another program.
|
|
||||||
|
|
||||||
*Have fun!*
|
*Have fun!*
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user