Forum Moderators: open

Message Too Old, No Replies

1998 meets 2014

         

lucy24

4:42 am on Jul 3, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



#1. How long can you stare at this*
function showGlitter()
  {
  <snip>
  animColor(255,255,153)
  PEN 2,2;
  // CALL MOVETO(126,210)
  // CALL LINETO(126,270)
  // CALL MOVETO(96,223)
  // CALL LINETO(156,257)
  // CALL MOVETO(96,257)
  // CALL LINETO(156,223)
  // CALL PENNORMAL;
  // CALL FORECOLOR(_blackColor)
  // CALL SETRECT(rect,124,238,128,242)
  setAnimPort(gWndPort)
  for (loop = 1; loop <= 3; loop++)
    {
    for (count = 0; count <= 28; count++)
      {
      // CALL INSETRECT(rect,-1,-1)
      temprgn = NEWRGN();
      // CALL OPENRGN;
      // CALL FRAMEOVAL(rect)
      // CALL CLOSERGN(temprgn)
      <snip>
      }
    copyAnimation(gSecondPort,gWndPort,@drawrect,_srcCopy)
    }
  }

trying to figure out how something can get inset 29 times in a row when it was only four pixels wide to start with...
... before the shoe drops and it's time for the "D'oh!" moment?

Answer: Longer than _secQuarter, which I would consider to be the outermost acceptable time :(

#2 Just how slow were computers in 1998? From context, it's obvious that there was supposed to be some kind of visible activity** here-- but there's no trace of a coded delay, meaning that I must have relied upon the thing taking some perceptible amount of time just to draw. And that's with the feature that called itself QuickDraw.

Just thought I'd share. Sigh.

Now off to redo it all with something involving
Math.ceil(count*Math.cos(Math.PI/6))

which seems more sensible all around.


* If the language appears slightly schizophrenic, it's because this is what it looks like after I've run a slew of Regular Expressions to deal with the control structures and get rid of superfluities like the, I think, five types of variable.
** I have no idea how the second and third iterations were supposed to work, since there's no intervening redraw of a blank picture.

piatkow

9:24 am on Jul 3, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



With that function name my first reaction was to try and identify an allusion to a disgraced pop singer!

I can remember one or two primitive animations that were dependent on processor speed and became quite laughable as PCs became faster. (Including a #*$!ographic one that I am sure everybody of a certain age here has seen)

engine

4:59 pm on Jul 3, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If I admit I didn't stare very long... ;)

lucy24

7:42 pm on Jul 3, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



See, that means your brain is in working order. With me, I was actually in another part of the house doing something else when it came nagging at the edge of my consciousness: "Oh, wait, were there minus signs in there?" Oops.

Since I only speak four words of javascript, the end result will sometimes be needlessly convoluted. But I do like the trio of functions
context.save()
context.clip()
context.restore()
... especially when it can all be drawn directly to screen with no fear of visible hiccups. I've got this one scene-- it's really just a throwaway joke-- where if you do something you weren't supposed to do, and then wait for a response, the next thing you see is sunlight moving across the floor to show the passage of time. It was fun being able to achieve the identical effect in two different languages.