My Pages

Saturday 29 November 2014

Random Line Generator

Enter this code into BBC basic (demo or full) and it will create a random line generator. Go to super decade games for more code like this. (That's my teacher's webpage)

  
  rem Random Lines 
      mode 6: off

      colour 1 ,rnd(255),rnd(255),rnd(255)
      gcol 1
      x%=rnd(1200)
      y%=rnd (950)
      xa%=rnd(1200)
      ya%=rnd (950)

      line x%,y%,rnd(1200),rnd(950)
      repeat
  
        colour 1 ,rnd(255),rnd(255),rnd(255)
        gcol 1
  
        line x%,y%,xa%,ya%
  
        x%=xa%
        y%=ya%
        wait 5
        xa%=rnd(1200)
        ya%=rnd (950)
  
      until false

Wednesday 19 November 2014

The First Post

The First Post


Hi, welcome to my very first post. I am using blogger to create a blog so here you go. I'm Sam and I will post code, games and just whatever else comes to mind.
Thanks for looking at my blog!!!