QB64 - QuickBasicSviluppo

QB64 – Screen Saver Cerchi Random

 

Con questo gioco di colori e cerchi, possiamo creare uno screen saver utilizzando QB64. Per testarlo copia e incolla il codice in QB64 e poi lancia direttamente il pulsante F5:

Dim Width As Integer
Dim Height As Integer
Dim Colors As Integer
Dim x As Integer

Width = 1920
Height = 1080

Screen _NewImage(Width, Height, 256)
_FullScreen

Do
    For x = 1 To (Rnd * Width) / 2 Step 10

        Colors = Int(Rnd * 256) + 1

        Circle (((Rnd * Width) / 2 + x), ((Rnd * Height) / 2)), x, Colors
        Paint Step(0, 0), 0, Colors

        Circle (((Rnd * Width) / 2 - x), ((Rnd * Height) / 2)), x, Colors
        Paint Step(0, 0), 0, Colors


        _Display

    Next
Loop While InKey$ = ""
/ 5
Grazie per aver votato!

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *