pouët.net

Go to bottom

Elite Demo

                  CHARVEL DEMO DISK#1 October 1991

     Welcome  to the first  (official)  Charvel Demo Disk (Don't buy
inferior versions), featuring:
*A three  dimensional  development  collection from  the  basics  to
   active three dimensional environments.
*A hands off  (the keyboard  onto the  joystick!)  three dimensional
   Elite Demo.
*Pictures drawn with peintre,eye q and painter (in that order).
*QSPEC a spectrum compatable tape system with conversion routines.

      3Dv1-5 value meanings.

RI  R oll    (0-254 step2)          X co-ordinate (wraps)
HI  H eading (0-254 step2)          Y co-ordinate (wraps)
PI  P itch   (0-254 step2)          D istance (wraps)
    I ncrement (for X,Y&D)          P erspective (or off)
    (MODE)          (DIRECTION)     (STYLE)     F rames per second
      RI,HI & PI:
These are  increments for the roll,  heading and pitch used during
rotation (by ROT or R+D mode or space and left/right). I.E:
If RI=1, HI=2  and  PI=0  after each  rotation  frame  roll  would
increase by 2 (1*2) heading by 4(2*2) and pich by none.
      Modes:
ROT ate continuous, DIR ect rotation, R+D rotate and DIRect active
      Direction:
Rotation direction L eft, R ight (with using space and left/right)
      Style:
O verdraw  (don't CLS after frames),  L ucid faces (Draws one face
each frame), W ireframe (no hidden lines).

            A HISTORY OF OUR THREE DIMENSION EXPLOITS.

                               3Dv1

     This was a result of initial experiments into three dimensional
graphics back in early 89. A myth  hung over  Rob and me (Dave) that
it  was  a very  complex  subject but  in it  wasn't, just  a serial
rotation around three circles, easy!  Having already  written a line
routine it wasn't long  before our  first object  was moving  on the
screen (Actually both of us wrote versions  during a late  night and
early morn at Rob's nan's but Rob's didn't work).
      Rob's the  mathamatician and realy  without his  assistance  I
probably would have  stuck to 2D  programming (for better or worse).
Next was a line clipping routine.  Again the battle was set, Rob and
Me were at ends to write one in Basic first; Rob did, followed by me
,though  mine was shorter and Rob's was an endless list of exception
clauses. After studying the problem from a clearer view  at work (in
a Pub)  I found a tidier logic method.  It was soon written in basic
(much better and shorter) and then converted into  machine code (Rob
did the math half I did the logic), after a  heavy night.  Rob fixed
some signed branch decisisions a bug that I was too tired to notice.
      I wrote some  control code for  the 3D  routine which  checked
keys and displayed values.  We both  designed and coded graphics.  I
did the perspective  (in a couple of minutes) after Rob with all his
mathamatical  alogarythms failed.  The perspective can glitch though
when the object  is too close because  values are  magnified so much
more due to  the logarithmical  nature  of perspective.  Perspective
also looks wierd on wireframe.
      Version 1 was tidied up after version 2 to conform to some new
keypress's and visual layout.

                               3Dv2

      The step  to  the faced  version 2 was  realy a  big  one.  We
laboured on a the problem of whether a  face was visiable  or no for
over a week trying numerous methods in  Basic.  Rob came up with the
most, half of which I couln't understand and insisted wouldn't work,
and they didn't! Finally Rob came up with a  method that worked, and
we employed it. It worked by  each face  (side) having  a point that
was especially coded, which was on a vector at right angles from the
object's centre and the plane of the face, and if after rotation the
z value was positive the face was not visable. The only problem with
this method was calculating these points!  It was 1% calculation and
99% guess work, and coding all version 2's graphics was a real bane.
Perspective  doesn't  work  with this  method  either  but was  kept
anyway. The object data was completely diferent to that of version 1
and took up much more memory.
      Mark appears on the scene (a weirdo rocker come sex maniac who
liked computers  (the usual  specification  for an Amiga owner)). We
drew all the Elite  ships from the  Elite manual  and the  Ami Elite
startup  (where all the ships appear, stay a bit then dissapear)  in
Mark's bedroom one evening  (We discover  Rob who finished his third
in no  time can't  draw  (his Thargoid  looked like  an upside  down
yoghurt pot)). Mark  discovers he isn't able to code in the graphics
(despite much primary style tuition) after he realises how boring it
is (smart kid).
      I finish Version 2  and make many modifications to the control
code and other subroutines  including a rewrite of the line clipping
routine  after  seeing a 3x3 boolean  matrix  method in  a book (one
glance was all I needed.  "Of course!"), it  made version 1  run 15%
quicker mainly because it  was self selective of the maths it had to
do and the Scrolly, (painfully slow, and I  never  replaced it after
the version 3 re-write) Mark drew the character set from a typestyle
book that I chose after  winning after a guess  the random number on
the calculator game  (I actually  won it three  times ater the first
two were ruled void by Rob and Mark (predictable tactics!)).

                               3Dv3

      All change again. Rob and Mark become rather allergic to QL's,
I'm on my  own (again).  Version 3 needed a fast  shape fill routine
and it was a long time comming. I started it many times leaving bits
of code  going 'in the  wrong direction',  though not  essentially a
very complex program, but it had many ways of doing it (programmer's
bane), and  I'm not good at  deciding best ways and get  frustrated.
It was written, and perfected many times  which resulted  in my most
prided piece of code. One thing that also  came out of the FillSHAPE
routine was  that it  also did the  face check  (no more face points,
"YIPEE!").
      After  a quick  sneak at a  book in the  local computer shop a
diagram explained all, points that were in a rotational order, so if
all the points were coded for example in a  clockwise order from  an
external viewpoint  and when  rotated were  then  anti-clockwise the
face wasn't visable. Easy, and when the FSHAPE  routine goes to draw
a horizontal line and the points are not left  to right when drawing
a face  shape it's  not visable.  Another  way to do it was find the
top point  and calculate  gradients to the two points left and right
of it, if the gradient to the  right point was less than that of the
left point then it's not visable. Perspective worked fine with these
methods.
      The scrolly was re-written  (try messing with the cursor keys,
enter and \). Code was written to enable  it to run on 128k machines
though it would  not return to basic  (CALL address,128)  and it was
ported  to the  earlier versions.  The new object data structure was
much better,  and all  those  stripples  (press Y),  I  did all  the
colours (boring).  Did some more graphics,  and could  get away with
more being able to overdraw.  I was very pleased and relieved on the
final speed of the solid version.  Seeing the 3D routines running on
a Gold Card makes me wonder  why I spent so long perfecting routines
to obtain optimum speeds. Awesome!.

                               3Dv4

      "Cor, wouldn't it be great to see x-wing in solid, DAVE!" said
Mark, after  seeing version 3, hence  version 4.  It was meant to be
able to display any complex object, and it  could cope with many but
the method was too simple to be very, effective, it virtually worked
with x-wing (two very minor gliches) but struggled on the guitar and
bird of prey. Version 4 decided not suitable, and left.

                               3Dv5

      All change again.  Wireframe, Faced and Solid combined version
(Use 'A' to toggle).  The main  problem with  v5 was the data format
and the colours (I actually couldn't be bothered with them). It  was
inevitable that this was written and as mentioned eThe line routines were
later significantly speeded up 6-20%  making the wireframe and faced
outputs extra zippy, with a smaller improvement to solid and scrolly
speeds.

                               3Dv6

      Another try at complex  shapes.  Close but not perfect, faster
than version 4 and more adept, though and also with view-(A)xis  and
0,0 cross(W)ires. It still looks like I'll have to call on even more
complex methods (and a considerably slower).  I'm now thinking about
light shading. Hmm, that would be nice. Now lets see, plane normals,
colour list... The rotaing head looks alright,  but thats about all!
I've worked  out how to store  150+ equally complex animation frames
in 512k! Maybe later...

                            Elite Demo

      A pretty boring demo, but I got  fed  up with it.  I may write
the proper thing soon any way.


         Dave Barker 22nd August 1992 (p.s. I need a job!)


      Y & T the worlds greatest ever rock band. 1976 - 1991.


Dave Barker     Demo disk assembly
021-350-2252    Programming  3D1, 3D2, 3D3, 3D4, 3D5, 3D6, Elite Demo
                Qspec Picshow, All 2D & Some 3D Graphics

Robert Nash     Some 3D Graphics
021-356-6875    Some programming 3D1,3D2 (visual face theory#1)

Mark Handley    Some 3D Graphics
021-588-5532
Go to top