Despair
A New Experience in eye-burning
by Iguana

DISCLAIMER:

We hope a non-formal legal text will suffice to give you the idea.

We DISCLAIM ANY AND ALL EVENTS ARISING FROM THE HANDLING, UNPACKING
AND/OR EXECUTION OF THIS SOFTWARE, INCLUDING DAMAGES OF ANY KIND
OR LIABILITIES OR WHATEVER. They key phrase here is  ^^^^^^^^^^^.
THIS SOFTWARE IS (C) COPYRIGHT 1996 by Iguana, AND CAN BE FREELY
DISTRIBUTED BY ANY MEANS. We won't be able to stop you doing so,
therefore we don't care.

All trademarks are property of their respective holders, etc, etc.

--- Real info

First of all, a little quote from the Euskal Party Invitation:

The code that makes the invitation is mostly generic, so expect these
additions for our next productions:

- Some 3d objects which look nice when shaded in truecolor. Hm... maybe
not, we have a tradition of avoiding vectors where possible, so who
knows? However, we're running out of 2d ideas.

It seems that we managed to comply with our expectations: Despair does
not contain any polygon objects. We like 3d-based demos but think that
they are becoming a factor to stop development of new effects in demos.
On the other hand, we have ourselves the risk of getting outdated
by not exploring the possibilities offered by vector-based demos, so
my guess is that our next production will be heading in that direction.
We hope we can still get something fun to watch as well as cool in
terms of vector code. And, of course, with those colors. :)

--- Yeah right, but why?

Again we were faced with the idea of being at the Euskal Party, and not
working on our computers; and we decided to try something once again.
We had some previous stuff, and we started putting it together about
seven hours after arriving at the partyplace. 35 hard hours later we
had a complete demo ready for the competition, and surprisingly, we
won. We all think that there were better entries than ours, but well,
it's people who decides by voting. Respect goes to Exobit, Incognita,
The Banner, TLOTB/Zoran, Crystal Shade, Requiem, Clone0 and Marathon Man
for their impressive productions, which have raised the quality of the
spanish scene to match any international standard. Not only is Iguana
not alone now in the spanish scene, we certainly aren't the best in our
country anymore. This fulfills a dream that started more than three
years ago, a dream in which Spain was not considered a second class
country when it comes to use and understanding of technology.

This demo has been created on a Pentium 100 class machine with fast
graphics and GUS soundcard. This is the kind of computer we expect
it to be run; anything less may force the demo to run slow and jerky.
Some parts might have been more optimized, but the raytracing and
the credits part really need this fast machine, so why care about the
rest? Besides, we like to make things, not to go over and over around
the same piece of code to tweak its CPU usage. Therefore, we prefer
to work mostly in C (Watcom C of course) and leave ASM to were it is
badly needed. This demo has about 10Kb of ASM source, and more than
150Kb of C code, to give you an idea. Oh by the way, you will probably
need 8 megs of memory. We haven't deeply checked this, but as you
will want to have a Pentium, this should be no problem. We are fairly
sure that the demo will require you to tweak your system files if you
want to try with just 4 megs.

Sound is produced by the excellent VTAL Sound System, which supports
natively the Ultrasound and SoundBlaster ranges of cards. You will
need a compatible soundcard to enjoy the demo, because there is no
"no sound" option. Make sure you have your ULTRASND or BLASTER
environment variables ready for the demo to parse, we don't like
hardware detection nor boring setup programs.

Some sources from the demo will probably be released some time after
the demo has been spread. As usual, they will not be directly compilable
but rather require you to dig into them and understand how they work.

Some facts about Despair:

- The raytracing is real 160x100 motionblurred raytracing. We haven't
measured the actual number of rays traced each frame, but it may
be around 2000-6000 rays depending on the actual setup of the
scene. It has two infinite planes textured with a checkered
pattern, three solid phong spheres and two negative spheres that
perform CSG (Constructive Solid Geometry), being able to cut
pieces of other objects. There's two moving lightsources too.

- The music was composed by Estrayk some time ago on his Amiga. It's
a 4-channel tune that fits perfectly in this demo style: varied,
colourful, simply fun. Surprisingly, this tune was going to be
used in the demo that won the Amiga demo compo: we send eternal
gratitude to Zaborra for changing the music of their demo, as
we rely heavily on the music timing and would have been unable
to change the tune in time for the competition. Zaborra used
another song by Estrayk and won the Euskal Amiga compo, which tells
a lot about Estrayk's quality as a demo music composer.

- The endpart is generated in 32-bit truecolor, then drawn to the
screen in whatever mode the screen can be put on. One layer of
texture, other layer of RGB plasma, two layers of greetings
bitmaps and another two layers of text, all rendered with
variable alpha blending, dithering and antialiasing, make this
part a real CPU hog. But we think it looks nice. If your video
card doesn't support 320x200 in hicolor or truecolor modes, we
recommend that you get UniVESA or Scitech Display Doctor from
Scitech Software to fully enjoy it.

- You can produce screen captures of the display at any time,
simply press the PrintScreen key and a numbered PCX picture
will be saved (or 24-bit TGA for the endpart).

--- Troubleshooting/Compatibility/Bugs issues:

You can override the SoundBlaster card type with the -type command-line
parameter. The -bpp [8, 15, 16, 32] parameter will select different
display color depths for showing the greetings screen. Some of these
modes have antialiasing and dithering code for embellishing the final
image, and the -bpp 8 mode should be compatible with *any* video card
(thanks to jmagic for the basic fakecolor technique), but slower than
the other modes. We are working on better emulation modes, but video
card manufacturers should realize that their hardware can do much more
than simple standard resolutions; they ought to enhance their VESA BIOS
code.

Most of this demo was developed in a DOS box under Windows 95, so there
should be no problems with that other than faulty drivers. As mentioned
before, you will probably want to have 8 megs. Absolutely needed is a
soundcard, and most probably a Pentium machine to enjoy. We recommend
a disk cache because we load stuff on the fly, and that may cause
delays in the synch points (hey Trixter! :)).

The images are brightened on the fly, in order for them to look better
at the party screen. Also, there's no use of VGA ports anywhere other
than the fakecolor emulation for the endpart. We have tried the demo
with the miroMedia View videocard, and found that it works perfectly
except for some details: when the videomode is changed, the computer
freezes for one or two seconds, including the music playback. Other
than that, the card sets video modes to PAL or NTSC refresh rates (50
or 60 HZ), which may cause problems with code that relies on the video
refresh rate of known modes, like 320x200 Mode13. The demo doesn't have
any problems with this because it doesn't synchronize to the screen.

We have noticed too some problems under Win95: when the music is playing
by GUS and we set the 640x480x256 VESA video mode, the whole DOS session
crashes. This never happened before with the other video cards. Loading
UniVESA or playing the sound by the SoundBlaster cures the problem. We
have traced the crash to happen the second time we call the VESA Get
Bank function, which is really weird. There's no need for the music
to actually be playing, merely uploading the intruments to the GUS
memory causes the crash to appear. Under UniVESA that works perfectly.
However, UniVESA seems to create its own problems, disabling interrupts
when it gets called (this somehow reminds me of the previously mentioned
problems when connecting the card to a TV set). This shows extremely well
in the endpart, where we have to make three calls to the VESA banking
function to display each frame (we're not using Linear Frame Buffer). None
of these problems show up under plain DOS. DOS4G/W or PMODE/W don't make a
difference.

We will try to trace the problems to a higher detail, but for now we're
blaming a faulty combination of hardware and Win95 system and drivers.
We want to emphasize the need for groups to test their work and
make sure of its robustness; especially when you want to compete at
a demoparty. It's not nice to see your hard work crash and be ridiculed
in front of hundreds of people. Trying the demo in hard conditions like
DOS sessions under Win95, OS/2 or NT is a good way to stress the stability
of the code.

We have also found a strange problem when using GUS music with DOS 7
(Win95 command prompt) with EMM386: it bombs in the middle of the demo
saying we need to enlarge the size of the DMA buffer up to D=64. We have,
and still the problem exists. Doesn't happen with SB, which is weird
since the GUS code doesn't use DMA, not even for uploading samples to
the card. Guesses are going in the direction of a conflict of some alien
kind between the GUS and the miroVideo. Will have to check extensively
the miro card setup, but I don't see why should it be using IRQ 11 or
DMA 5 or even port 240h, so the problem, even if spotted, will probably
be hard to remove. This hopefully doesn't have anything to do with the
demo code itself, as I never encountered any kind of problems for some
months now developing under DOS 7/Win95 (well, *mostly* no problems).

The demo works under WinNT 4 b2, but doesn't generate any sound thru a SB
AWE32. Nothing else seems to work with the SB in DOS under NT, either.

The screen captures for the raytracer don't save the blurred picture, so
you'll notice a pixel pattern. On the other hand, the greetings part will
save the image in truecolor even if it renders to the screen in 256-color
emulation mode. So, if your card doesn't support 320x200x32bit, save some
captures to get a feeling how it should look. Or buy a better card like
any with the S3 Trio64V+ which is fast and wonderful.

Every time you start the demo the first capture is numbered 00. I might
correct this before release, but it's not so straightforward because of
the different extensions (PCX and TGA).

There is no way to alter the setup the demo will use. Have your BLASTER
or ULTRASND environment variables correctly set, which is advisable
anyway.

--- Full Credits:

PMODE/W 1.22 extender by Tran and Daredevil
VTAL Sound System 1.02b by JCAB
WCGSL support library by Jare and JCAB

Design and code by Yann, JCAB and Jare
Music by Estrayk
Hand-drawn art by Kronos and COI
Textures by Jare
Greetings bitmaps by Poppy

Party support by Noisy Man, OLS, Parasite, Catwalk and Raquel.
Final testing by Nefron. Thanks to Diego and Gonzo for help.

We are active in the internet if you need to find us.

See you all at the Euskal Party 5, which will the biggest party ever in
southern Europe. We are confident that the party will find its own
personality in the general scene, and be an attractive offer for any
scener.

We dedicate this work to the memory of Lluis P. Garcia. May you enjoy
our work, wherever you are. We will never forget you.

Jare/Iguana, July 30th, 1996, in Madrid, Spain.