Ooops
March 05, 2021, 07:41:11 AM

Author Topic: [bb] Smiley Face by Xzider [ 1+ years ago ]  (Read 466 times)

Offline BlitzBot

[bb] Smiley Face by Xzider [ 1+ years ago ]
« on: June 29, 2017, 12:28:39 AM »
Title : Smiley Face
Author : Xzider
Posted : 1+ years ago

Description : This takes simple commands and makes a smiley face...
Not the best way to do it, but I am bored.


Code :
Code: BlitzBasic
  1. Graphics 800,600,32,2
  2.  
  3.                         Speed% = Input("Drawing Speed In Milli-Seconds (1000 Milli-Seconds = 1 Second - ")
  4.                         Size% = Input("Size of smiley? (250-400 recommended) - ")
  5.                        
  6.   Cls
  7.                
  8.   Color 0,255,0
  9.  
  10.   For degree = 0 To 359
  11.  
  12.                 Delay Speed%/200
  13.  
  14.                 x = Cos(degree)*Size%
  15.                 y = Sin(degree)*Size%
  16.  
  17.                 Rect(GraphicsWidth()/2+x,GraphicsHeight()/2+y,Size/50,Size/50)
  18.  
  19.   Next
  20.  
  21.   Color 0,0,255
  22.  
  23.                 Delay Speed%
  24.  
  25.         xx = -Size%/2
  26.         yy = -Size%/2
  27.  
  28.                 Rect(GraphicsWidth()/2+xx,GraphicsHeight()/2+yy,Size/25,Size/25)
  29.  
  30.                 Delay Speed%
  31.                
  32.         xx = -Size/2+Size
  33.         yy = -Size/2
  34.  
  35.                 Rect(GraphicsWidth()/2+xx,GraphicsHeight()/2+yy,Size/25,Size/25)
  36.  
  37.                 Delay Speed%
  38.  
  39.   Color 0,255,255
  40.  
  41.                 xx = -Size/2
  42.  
  43.   For i = 0 To Size/5
  44.  
  45.         Delay Speed%/20
  46.  
  47.                 xx = xx + 5
  48.                 yy = Size/2
  49.  
  50.                 Rect(GraphicsWidth()/2+xx,GraphicsHeight()/2+yy,Size/50,Size/50)
  51.  
  52.   Next
  53.  
  54.  
  55.                 Delay Speed%
  56.                
  57.                 yy = Size/2
  58.                 yyy = Size/2
  59.                 t=xx
  60.                
  61.   For i = 1 To Size/15
  62.  
  63.         Delay Speed%/200
  64.  
  65.                 xx = -Size/2 + 5
  66.                 yy = yy - Size/100
  67.  
  68.                 Rect(GraphicsWidth()/2+xx,GraphicsHeight()/2+yy,Size/50,Size/50)
  69.  
  70.        Delay Speed%/200
  71.  
  72.  
  73.                 xxx = t
  74.                 yyy = yyy - Size/100
  75.  
  76.                 Rect(GraphicsWidth()/2+xxx,GraphicsHeight()/2+yyy,Size/50,Size/50)
  77.  
  78.        Delay Speed%/200
  79.  
  80.   Next
  81.  
  82.                 Delay Speed%/500
  83.  
  84.         Color 255,0,0
  85.                 Text GraphicsWidth()/2,GraphicsHeight()/2,"I'm so happy!"
  86.                
  87.   WaitKey


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal