File: spritetest2.kbs

package info (click to toggle)
basic256 2.0.99.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,888 kB
  • sloc: cpp: 17,185; yacc: 4,025; lex: 1,466; java: 1,091; sh: 39; xml: 33; makefile: 20
file content (24 lines) | stat: -rw-r--r-- 388 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# spritetest2.kbs - jitter a collection of sprites
# 2010-06-13 j.m.reneau

fastgraphics

n = 10

spritedim n+1
spriteload 0, "test.bmp"
spriteplace 0,150,150
spriteshow 0

for t = 1 to n
   spriteload t, "help.png"
   spriteplace t, rand*300, rand * 300
   spriteshow t
next t

while true
   for t = 1 to n
      spritemove t, 5 - rand * 10, 5 - rand * 10
   next t
   refresh
end while