[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Low-level vs. High-level programming (was My First Computer)



In article <Xns93A0B0D6C5481wildstar128hotmailco@216.168.3.44>,
wildstar  <wildstar128@hotmail.com> wrote:
 
> pausch@saaf.se (Paul Schlyter) wrote in news:bcvu90$1tms$1@merope.saaf.se:
>   
>> Of course!  And that's built into the links between the HTML pages:
>> a HTML page with the ball hitting the paddle will of course link
>> to a HTML page with the ball just bouncing back.  Likewise, a HTML
>> page with the ball passing the paddle without hitting it will
>> link to a HTML page with the ball beyond the paddle, i.e. lost.
>>  
>> And, in addition, each HTML page will link to one of three different
>> HTML pages, depending on which of three links the user presses:
>> paddle-up, paddle-down, or paddle-doesnt-move.
><<< snip >>>
> 
> Ok, score keeping time now.
 
Easy: you add one set of HTML pages for each possible score.....
 
> BTW: How do you determine the right HTML page as the ball must
> continue to move without user intervention. How is that determined.
> How is score keeping determined when a ball gets passed the user
> and adds a point to the score. This requires variables. Where is that 
> data going to be stored.
 
Using variables for this is of course convenient, but it's not an
absolute requirement.  You can keep track of ball velocity and score
by making one HTML page for each and every possible combination of:
 
  ball position
  ball velocity
  paddle position
  paddle velocity
  score
 
and then link all those pages to one another in an appropriate way.
 
Of course this will make the number of HTML pages astronomical,
but in principle it's quite possible.
 
-- 
----------------------------------------------------------------
Paul Schlyter,  Grev Turegatan 40,  SE-114 38 Stockholm,  SWEDEN
e-mail:  pausch at stockholm dot bostream dot se
WWW:     http://www.stjarnhimlen.se/
         http://home.tiscali.se/pausch/