Asteroids -
Manwe
'24 Dec 15
\ use WASD keys : b button ; : d dup ; 2 b dt * 200 / d 1 @ sin * swap 1 @ cos * 4 @ 5 @ z+ 5 ! 4 ! 2 @ 3 @ 4 @ 5 @ z+ 3 ! 2 ! 2 @ x + .5 - 3 @ y + .5 - 5 b dt * 3 * 1 b dt * 3 * - 1 @ + d d 1 ! cos swap sin z* 2dup .05 + atan2 abs .4 < -rot .01 - atan2 abs 1 < - 0 max 6 @ sin dt * 2 * 7 @ + 7 ! 6 @ cos dt * 2 * 8 @ + 8 ! 3 b d d if 1 @ 6 ! then if 2 @ 7 ! then if 3 @ 8 ! then 7 @ .5 x - - d * 8 @ .5 y - - d * + .00003 < + x y ** 56 * sin 237 * d floor - 1000 * 999 - 0 max + d d
▶
*
\
use WASD keys
:
b
button
;
:
d
dup
;
2 b
dt
*
200
/
d
1
@
sin
*
swap
1
@
cos
*
4
@
5
@
z+
5
!
4
!
2
@
3
@
4
@
5
@
z+
3
!
2
!
2
@
x
+
.5
-
3
@
y
+
.5
-
5 b
dt
*
3
*
1 b
dt
*
3
*
-
1
@
+
d d 1
!
cos
swap
sin
z*
2dup
.05
+
atan2
abs
.4
<
-rot
.01
-
atan2
abs
1
<
-
0
max
6
@
sin
dt
*
2
*
7
@
+
7
!
6
@
cos
dt
*
2
*
8
@
+
8
!
3 b d d
if
1
@
6
!
then
if
2
@
7
!
then
if
3
@
8
!
then
7
@
.5
x
-
-
d
*
8
@
.5
y
-
-
d
*
+
.00003
<
+
x
y
**
56
*
sin
237
*
d
floor
-
1000
*
999
-
0
max
+
d d
Create a derived work
Printer View