March 05, 2021, 07:38:42 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Like stats
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
Graphics
»
[bb] Simple Flakes by Adam_128 [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bb] Simple Flakes by Adam_128 [ 1+ years ago ] (Read 413 times)
BlitzBot
Jr. Member
Posts: 1
Total likes: 0
[bb] Simple Flakes by Adam_128 [ 1+ years ago ]
«
on:
June 29, 2017, 12:28:40 AM »
Title :
Simple Flakes
Author :
Adam_128
Posted :
1+ years ago
Description :
Snow flakes for your every day winter needs
Code :
Code: BlitzBasic
;Simple Flakes by Adam Kewley
;
;press esc to exit
Graphics
640
,
480
,
32
,
1
Type
flakes
Field
x#
Field
y#
Field
c
End Type
Global
flake.flakes
Const
TOTALFLAKES=
400
SetBuffer
(
BackBuffer
(
)
)
InitFlakes
(
)
While
Not
(
KeyDown
(
1
)
)
Cls
UpdateFlakes
(
)
Flip
Wend
;------------------------------------------------------------------------------------------------------------------------
Function
InitFlakes
(
)
For
x =
1
To
TOTALFLAKES
flake.flakes =
New
flakes
flakex#=
Rnd
(
640
,-
70
)
flakey#=
Rnd
(
480
,
0
)
flakec=
Rnd
(
4
,
0
)
Next
End Function
Function
UpdateFlakes
(
)
For
flake.flakes =
Each
flakes
If
flakey#>
480
Then
flakex#=
Rnd
(
640
,-
70
)
flakey#=
0
flakec=
Rnd
(
4
,
0
)
End If
Select
flakec
Case
1
Color
80
,
80
,
80
dir=
Rnd
(
-.5,
1
)
flakex#=flakex#+dir+.1
flakey#=flakey#+.8
Oval
flakex#,flakey#,
1
,
1
,
1
Case
2
Color
120
,
120
,
120
dir=
Rnd
(
-
1
,
1.5
)
flakex#=flakex#+dir+.1
flakey#=flakey#+
1
Oval
flakex#,flakey#,
2
,
2
,
1
Case
3
Color
180
,
180
,
180
dir=
Rnd
(
-
1
,
2
)
flakex#=flakex#+dir+.1
flakey#=flakey#+
1.5
Oval
flakex#,flakey#,
3
,
3
,
1
Case
4
Color
250
,
250
,
250
dir=
Rnd
(
-
2
,
2.6
)
flakex#=flakex#+dir+.1
flakey#=flakey#+
2
Oval
flakex#,flakey#,
4.5
,
4.5
,
1
End Select
Next
End Function
Comments :
none...
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
Graphics
»
[bb] Simple Flakes by Adam_128 [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal