[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GScript BASIC updated
- Subject: GScript BASIC updated
- From: limtc <thyechean@gmail.com>
- Date: Fri, 22 Aug 2008 18:42:32 -0700 (PDT)
- Complaints-to: groups-abuse@google.com
- Injection-info: v16g2000prc.googlegroups.com; posting-host=218.186.11.5; posting-account=xPI8rAoAAABxyK8KyUIiYChvvtqAeJGI
- Newsgroups: comp.sys.apple2.programmer, comp.sys.apple2
- Organization: http://groups.google.com
- User-agent: G2/1.0
- Xref: g2news1.google.com comp.sys.apple2.programmer:633 comp.sys.apple2:2704
Added animate() command, and a new animation code call "ball".
An updated version now available here at:
http://virtualgs.larwe.com/basic/
Since I have separated GScript and GScript BASIC projects into 2
separate directions, I have change the URL (again) to put GScript
BASIC at its own folder (/basic rather than /GScript/basic).
Ball code:
x = 320
y = 200
dx = rnd(5) + 5
dy = rnd(5) + 5
hgr()
hcolor = rnd(15) + 1
print("Bouncing ball...")
animate(draw)
function draw() {
hgr()
x = x + dx
y = y + dy
if (x > 540 || x < 100) {
hcolor = rnd(15) + 1
dx = dx * -1
}
if (y > 300 || y < 100) {
hcolor = rnd(15) + 1
dy = dy * -1
}
circle(x, y, 100)
}