Ooops
November 28, 2020, 02:27:13 PM

Author Topic: [bb] CraZy Sticks! by Captain Wicker (crazy hillbilly) [ 1+ years ago ]  (Read 377 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
Title : CraZy Sticks!
Author : Captain Wicker (crazy hillbilly)
Posted : 1+ years ago

Description : This code demonstrates the usage of lines and background color within the old Blitz Basic 2D. This code by all means may be used in your own programs but please credit my original work by mentioning my nickname "Captain Wicker" in the credits. :)

Code :
Code: BlitzBasic
  1. ;************************************
  2. ;********** CRAZY - STICKS **********
  3. ;*** Small program written in b2d ***
  4. ;************************************
  5.  
  6. AppTitle("CraZy Sticks")
  7. Graphics ((640),(480),(16),(2))
  8. SetBuffer FrontBuffer()
  9.  
  10.  
  11. Repeat
  12.  
  13. RandomColor()
  14.  
  15. Delay(250)
  16.  
  17. Cls
  18. Flip
  19. Until KeyDown(1)
  20. End
  21.  
  22. ;Make a drawing function! /
  23. Function RandomColor%()
  24. ClsColor (Rnd(255),Rnd(255),Rnd(255))
  25. Color (Rnd(255),Rnd(255),Rnd(255))
  26. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  27. Color (Rnd(255),Rnd(255),Rnd(255))
  28. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  29. Color (Rnd(255),Rnd(255),Rnd(255))
  30. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  31. Color (Rnd(255),Rnd(255),Rnd(255))
  32. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  33. Color (Rnd(255),Rnd(255),Rnd(255))
  34. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  35. Color (Rnd(255),Rnd(255),Rnd(255))
  36. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  37. Color (Rnd(255),Rnd(255),Rnd(255))
  38. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  39. Color (Rnd(255),Rnd(255),Rnd(255))
  40. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  41. Color (Rnd(255),Rnd(255),Rnd(255))
  42. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  43. Color (Rnd(255),Rnd(255),Rnd(255))
  44. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  45. Color (Rnd(255),Rnd(255),Rnd(255))
  46. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  47. Color (Rnd(255),Rnd(255),Rnd(255))
  48. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  49. Color (Rnd(255),Rnd(255),Rnd(255))
  50. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  51. Color (Rnd(255),Rnd(255),Rnd(255))
  52. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  53. Color (Rnd(255),Rnd(255),Rnd(255))
  54. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  55. Color (Rnd(255),Rnd(255),Rnd(255))
  56. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  57. Color (Rnd(255),Rnd(255),Rnd(255))
  58. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  59. Color (Rnd(255),Rnd(255),Rnd(255))
  60. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  61. Color (Rnd(255),Rnd(255),Rnd(255))
  62. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  63. Color (Rnd(255),Rnd(255),Rnd(255))
  64. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  65. Color (Rnd(255),Rnd(255),Rnd(255))
  66. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  67. Color (Rnd(255),Rnd(255),Rnd(255))
  68. Line (Rnd(640),Rnd(480),Rnd(640),Rnd(480))
  69. End Function
  70. ;Finished!


Comments :


GfK(Posted 1+ years ago)

 You might want to read up on For/next, repeat/until and while/wend.


Captain Wicker (crazy hillbilly)(Posted 1+ years ago)

 Ok thanks GfK :)


Ethan(Posted 1+ years ago)

 That was cool thanks cap.


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal