file_id.diz
Scumble
ÒItÕs a sort of tonic,Ô said Nanny. She flicked the cork out with her thumb; on the ceiling above her, the paint crinkled. ÔItÕs made from apples. Well... mainly apples ...Õ - ÒMaskeradeÓ Terry Pratchett
This demo is in the style of early 90s demos on PC and Amiga. I could probably get away it in a demo around 1993-94. Especially the polygons and the bumpmapping. God only know what democoders on Amiga and PC are up to these days. Quake-engines, fuzzy logic and AI, no doubt.
But since demos on the Mac are few and far between, I can with good concience consider myself the elite of the Mac demo scene. To the best of my knowledge this demo is only the 6th or 7th ever made, so it's a pretty good bet that I am at least in the top 10.
There is no timecontrol to speak of in this little demo, so if you have a particulary powerful Mac, the demo will be a quick thrill indeed. I bet you're regretting that G3 purchase right about now.
Oh, and Stu tells me that there is a problem if your startup screen isn't the main screen. The colours will probably be messed up. All in all, not a good week for rich kids with fast computers and two monitors .
You can exit during the final part, the bump-mapping, by pressing a key.
Your resolution *must* be higher than 512*400. Hardcoded values, don't you love it?
Scumble wants 256 colours. If it can't get it, it just quits. 'Cause life's like that sometimes.
You can generally do with the source what you want. Just don't say you made it, when, in fact, you didn't. And why would you want to?
Some portions of the code are by Lightsoft. Thanks.
Since I release this code to everyone who has the urge to see it, IÕm allowed a bit of text where I can make excuses for all the strange things I do.
THE CASE FOR THE DEFENSE, MÕLORD
The main reason for the, erm, ÔweirdnessÕ of this little demonstration, is that it was made iterative (I think thatÕs the word).
I first made a polygon-routine. Then rotated the polygons. Then sorted them. Then made ÔfakeÕ goraud. Removedbubblesort. Inserted z-buffering. As more and more things were added and removed, it just became difficult to keep track of it all. For a moment I was even afraid that IÕd run out of registers with the goraud(on a PPC? Ouch).
Anyway, by the time I reached texture-mapping, I decided it would probably be best if I started from scratch. Oh, and skipped triangles. So the polygon-routine stayed as it was.
ThereÕs a lesson hiding in this somewhere, but IÕll be buggered if I know what it is.
It certainly not the fastest polygon-routine in the world. It *is*, however, z-buffered (which account for much of the sluggishness). When using so few faces, bubblesort would have been a good deal faster. But at least the sorting is pixelperfect now.
It can easily be seen that IÕm using z-buffers: otherwise I wouldnÕt have been able to mix the polygons pixelperfect (nice word).
Please note that the z-buffer is quicker than youÕd think, because I only need to clear the z-buffer every 130th frame or something like that. It *could* have been every 858992th frame, but that would have made the z-buffer wordsized, and I donÕt have that much memory to spare. Still, it was quite a speed improvement.
Okay, okay, I know what youÕre saying. ÒCanÕt the 3d-engine handle more than 8 faces? The polygon doesnÕt look very impressiveÓ. Quite right. Of couse it works with as many polygons as youÕd like (memory permitting), but my idea of fun isnÕt designing a 3d-object with no GUI or nothing. Try making a human face if youÕre so clever (a duck is apparently popular, too).
I know plasma is old stuff. Plasma is psychedelic patterns on your screen. Looks kinda neat, but has no obvious function. Nonetheless it's probably an interesting example of applied mathematics ... no, I'm reaching, aren't I? Still, it's in the demo.
There is a known bug in the plasma. Blacks spots will occur when the colour is zero. A check would slow it down a fraction, so that's why I left it in.
What do you mean Ònot optimizedÓ. Divw rules! Seriously, I have more or less ignored optimzing. Especially stalls. It has been a halfhearted attempt at best. I have tried to avoid the two ARGH! mnemonics, mulw and divw. That's about it.
IÕm especially sorry for the weird comments on the screen. But look, guys: itÕs a demo. YouÕve have to say daft stuff like that. So, erm, word! Right on. Dig the funky groove (IÕm terrible at this, arenÕt I?)
On the upside, the source is relatively easy to read. *I* understand it, anyway.
FINAL ARGUMENT
I would like to thank all those PC-coders whose code and texts IÕve read. Having said that, I just want to silently curse them. ItÕs not cool or clever to replace all you sÕs with zÕs. Pleaze stop doing that!
I know how to optimize the inner-loop of an Intel-asm texture-mapper. God, I wish I didnÕt.
And finally, why canÕt you call yourself normal names. IsnÕt it rather childish to call yourself Slayer, Manhunter, Duke Of Demo and so on? Yep, itÕs childish or my name isnÕt Maccoder ....erm... damn, damn, damn!
Oh, and since this is some kind of cool demo-type thing, IÕm allowed to send out greetings. So, greetings to:
Stu and Rob for making an excellent assembler, and for helping with the wonderful polygon bug, testing and generally performing above the call of duty. Guys like you, *do* grow on trees.
Anders for sending me sin-tables and c-code when I asked. One of the good guys.
Arthur for making a great Nintendo-emulator.
Thomas the other beta-tester ;)
Everyone on the listserver for pure entertainment and being good guys all around.
For the record: Scumble was developed on a Macintosh Performa 5320 (120mhz) with 16mb RAM. It moves at an okay speed on my computer, but I'll let you be the judge.
I take no responsibilty if this code messes up hardware or software on (or in the vicinity) of your computer. And so on...
THE DEFENCE REST, YOUR HONOUR
Questions about the source, algorithms or life in general? Mail me at: maccoder@post6.tele.dk. Oh, go on.