home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
No Fragments Archive 10: Diskmags
/
nf_archive_10.iso
/
MAGS
/
MUCH
/
MSG01.MSA
/
ARTICLES_CODING.DOC
< prev
next >
Wrap
Text File
|
1993-06-24
|
14KB
|
247 lines
A COUPLE OF HOURS' WORTH OF A DEMO CODING SESSION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Right. You have the idea (3D sine-distorter), you have the graphics
(which took several attempts to get the right palette), and you have
the music (which took several re-loadings of STOS while trying to guess
the right bloody offset!) All you need to do now is write the program.
First of all, you think "I know. I will load in my demo shell,
therefore making it easier to set about my demo." You eventually locate
the correct disk with the file on, and load it in - only to find that
you had accidentally saved a recent demo (which used the shell) over
it. You then spend five minutes picking out and erasing individual
lines, and clearing the memory banks.
Start again. First of all, you attempt to write the code for this
amazing new distorter. After several minutes of pulling your hair out,
swearing, throwing disks about, and generally behaving like a drunk
lord, you complete the code. Now - SAVE the code. This is the clever
bit. Once you get to this stage, ask yourself these questions:
i) Is there any space left on this disk? (likely answer: NO)
ii) Have I got any other disks? (likely answer: YES, ONE. BUT NOT
FORMATTED)
iii) Is there anywhere at all I can save this code? (YOU COULD TRY YOUR
HARD DRIVE)
iv) Is my hard drive working? (likely answer: NO)
v) Is there any way of formatting that disk without leaving STOS?
(YES, USE THAT FORMATTER YOU CAME ACROSS WHILE BROWSING THROUGH
ANOTHER OF THOSE DODGY SOURCE DISKS)
vi) Does it work proporly? (likely answer: WHAT DO YOU THINK?)
Then, with great hesitation, switch off your computer, format that
disk, reformat that disk after finding out that you did it single-sided
and not double-sided, then load STOS back up again. Go and make a cup
of very, very strong coffee and a fag to help calm your nerves.
Now then. Load up the shell. Curse through your teeth as you realise
that you didn't save the empty demo shell after ridding it of that
other demo, and spend another five minutes clearing everything again.
Save the bloody shell. "Error: Disk is write-protected." I DON'T BLOODY
CARE, JUST SAVE THE BLOODY SHELL!
Computer commences to save the shell on a write-protected disk. You
write enable the disk and save it yet again, so as not to take any
risks. RIGHT. Re-type all of that code again. Begin to lose temper when
you realise how different it is from the other version. Carefully check
this version, and feel satisfied that you must have been drunk when you
typed the last version.
Save this code on your newly-formatted disk - eyeing the computer and
daring it not to save proporly. It saves proporly (you have also
noticed that the computer has begun to panic slightly.)
Your trembling finger reaches for F6 (run). You close your eyes. You
press the button, and hear a faint whirring sound. Your eyes fly open
and you realise you were so nervous that you accidentally pressed F5
(save as) instead. Wait several seconds before you can click 'QUIT'.
Now, with eyes open, press F6.
The screen clears, and you get what seems to resemble more of a cross
between a map of Northern Carrick-on-Suir and a floating eyelid, than a
3D distorter. Press SPACE. Realise that you got the wrong HARDKEY code,
and press RETURN. Still nothing happens. Commence to press every key on
the keyboard, the mouse, the joystick, and the printer in an attempt to
quit the demo proporly. Give up and press CONTROL - C instead.
List the offending lines and exhale deeply. If necessary, meditate or
perform light Yoga to calm nerves and protect breakable vases,
ornaments, etc. from being hurled at great speed across the current
room.
Check the code. Re-check the code. Check it again. Start reading every
single command out loud so you can detect the mistakes better.
Something along these lines may result: "RIGHT. 10 CLS. YES, CLS STANDS
FOR CLEAR SCREEN, AND DOES JUST THAT. CLEVER ISN'T IT? NOW THEN, ONCE
YOU HAVE CLEARED THE SCREEN YOU DOZY COMPUTER, YOU GO ONTO THE NEXT
LINES, WHICH SAYS 20 CLICK OFF. OOH? WHAT DOES CLICK OFF MEAN? AH YES!
IT MEANS SWITCH OFF THE KEY CLICK..." (NB: Statements like these should
be read very sarcastically indeed, as if to a mere child [or other less
intelligent being])
Suddenly realise that you put START(6) instead of START(5) and
therefore the computer was trying to distort part of the music and not
your amazing new logo. Alter the mistake. Save the code YES I KNOW IT
ALREADY EXISTS, JUST SAVE OVER IT. OH FOR GODS SAKE GET RID OF THE .BAK
FILE IF THERE ISN'T ENOUGH SPACE!
Blush as your mother or other close relative pokes his head around the
door (if they are twins, they would DOKE their head around the door,
and if they were quadruples, they would LOKE their head around the
door...never mind!)
Once asked who the hell you are yelling at, just say you are trying out
a new sample that you found lying on a coverdisk, and that the volume
was up too high. (so what if it sounds exactly like me? - who doesn't?)
Inhale deepy (preferably with cigarette between teeth) and calm down.
(Non-smokers should try more yoga.)
Save the program, and run it again. YES! At last, you have a 3D
distorter on the screen. Next job - set up the paths for it to follow
using complex mixtures of SINES and COSINES. Spend several minutes
testing out the best paths. Realise that there is a syntax error
somewhere on your
=(SIN(RAD(T*3))*COS(RAD(T/2))/SIN(RAD(T))*COS(RAD(T*T))/SIN(RAD(2*SIN(
RAD(T))) line and try and count how many brackets there are in case you
have put too many or too little.
Spend even more time counting again. Swear as you find out that the
brackets are right - you just forgot to put SN(T)= at the beginning!
Apologise to parent for swearing and promise never to do it again (at
this rate, that would prove to be a most difficult task).
Time to summarise where we are. We have got the 3D distorter right. OK.
Right. OK. Riiigghhht. (You are pretending to sound like you know what
to do next in a hope to provide self-encouragement. Instead you are
making a prat out of yourself as your really good-looking sister who is
at this very moment outside your bedroom door is hearing this 'OK.
RIGHT. OK. RIIIGHHT. NOW THEN. OK.' coming from somewhere inside your
bedroom)
Tell your sister that you keep finding these really wierd samples on
coverdisks, and that you are going to write a complaint to put more
decent stuff on (fat chance!)
Wait for sister to go away before rushing downstairs, extracting a
bottle of highly-alcoholic drink from your grandad's secret army
surplus 1942, and taking a big gulp.
[optional] cough, splutter, wheeze, and puke all over the sofa in an
attempt to control the alcohol (and what's left of your brain).
Stagger back upstairs, sit down, light up another fag, and return to
your demo. That quick swig, although not doing your internal digestive
system much good, has actually livened up your brain, and you now think
you know what to do next. The scroller. This is another clever bit.
First of all, you need your font.
Exit STOS. Yell out the strongest swear words in the Essex dictionary
as you forgot to save your latest version of source. Pay £150 fine for
breach of peace and foul and abusive language. Return home from local
nick the next day and make up some excuse to your mum that you went out
with some friends last night, and slept around their house.
Return upstairs and collapse with despair into your programmer's chair.
Promptly crash to floor as you forgot where said chair was (that Scotch
Drambuie is still pretty much in effect).
Pick yourself up and gently lower yourself into said chair. Load up
STOS. Wait for ages for your many extensions to load in. Very gently
curse as you forgot that you wanted to load up your font disk instead.
Reset machine. Sort through your disk boxes in a vain attempt to find a
font disk. Curse (slightly louder this time) as you realise that you
must have formatted over them. Load up favourite art programme and draw
out your own font (to add extra tension to this, you are not the best
of artists).
Save picture. Realise that you had set the snap to 33x33 and not 32x32
and use the updated 'reduce' function of the art program to reduce the
font slightly in size. Find out that your font looks absolutely
pathetic when it is reduced, and so draw the whole lot out again.
Save font. Load up STOS. Compact font. Save compacted font. Load demo.
Try desperately to remember what your demo was about. RUN it to find a
map of Carrick-on-Suir. Rack your rotting brain - swearing to God that
you had solved the problem only the previous day. Accidentally find out
that you had inputted the wrong screen address and make some sort of
cheering noise. Shout to sister that you have actually scored a goal on
KICK OFF 2, and are not losing sanity at all - in the slightest. Murmur
to yourself that you doubt it, and set about making your scroll code.
Give up after several minutes of getting little blocks of garbage to
fly aimlessly around the screen (and actually outside the border - but
you didn't want to do that). Load up someone else's scroll code and
change the variable names so noone can check that it was their code in
the first place.
Start writing scrolltext. At the stage your mind is in, it would
closeley resemble this:
'AEGH89346N902G6 8356N2UM757(357Y416W5Y7/*6*2(ERC/9236B (W46(U7- *945.'
Write pages and pages of scrolltext. Run demo and get last sentence of
scroller. Realise that you put M$= and not M$=M$+ at the beginning of
every line, and spend hours changing each one. Realise that you could
have simply used the 'CHANGE' command and curse again.
Save the code. Next bit. The flying raster bars. Ho Ho this WILL be
fun! Save six copies of this source over different disks (not caring
whether they are formatted or not). Notice that you actually saved one
of the copies on your dad's favourite old 12-inch DES O'CONNER record.
Look puzzled as you try to work out how you managed to fit it in the
drive. Receive pats on the back and a fiver from your mother when your
family realise that you get a rather rhythmic blurple instead of DES's
oh so wonderful tones the next time dad tries to play it.
Load in your assembler 'raster' routine (shaking and sweating) and
start entering the colour codes, and correctly setting up the data and
address registers. Phone up local computer repair shop and warn them
that they might be needed pretty soon. Save the code. 'Sorry, sir?' Put
the receiver down and stop thinking out loud. Save the code.
Look in mirror to see how pale your face is. Creep downstairs and find
a Sainsbury's carrier bag and between thirty and fourty ice cubes.
Place these ice cubes in the carrier bag, and balance the bag on your
head (you will probably need some string to tie it to your head via
your ears - should the bag decide not to stay put).
Walk upstairs, and straight into your sister. Don't bother making up
any excuses, just walk straight into your bedroom and sit down. Tell
her to GET LOST as she peeps around the door, looking worried.
Try to remember what was happening, and why you are shaking. Oh yes -
you were just about to try out the raster routine. Press F6. Get a
message from nice Mr. Allan saying that if you don't register for the
Missing-Link extension, he will not bother making extensions any more.
Promptly send nice Mr. Allan ten pounds, and run the program again.
The ST crashes. Well I never did. It was as you expected, after all,
who can possibly get a raster routine right first time? Shake your head
to clear the list of names that has begun forming within.
Load STOS. Load demo. Check over your code. Realise that the raster
routine uses the same timer as the wonderful STOS chip music you were
using. Headbutt the wall and call yourself various adult names for
being so stupid as to use STOS music. BLOAD some Mad Max music instead.
Look worried when you can't remember whether the offset was 8 or 28.
Just guess and press F6 - what the hell. You now get a rather good - if
not slow - demo on the screen.
Say "I don't care - it's a demo" and compile it. Run the compiled demo.
Computer crashes. Sit in silence trying to work out why the interpreter
version worked when the compiled version didn't. Eventually work out
that the Compiler accessory being loaded in must have offset and
relocated the music bank elsewhere, and so you needed to reload the
music in either after loading the accessory or after compilation.
Look puzzled as to where all of that bo**ocks came from and load STOS
in again. Load the compiler first. Load your demo. Compile your demo.
Load the music in again. Run your demo. Find your demo still runs at
twelve and a half Hertz, switch off computer, throw disk out of window,
sit on and therefore collapse STOS box and take up Llama painting
instead!
Article: BLACK EAGLE 25/6/93