• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

COPYINGH A D01-Jul-199914.8 KiB281237

ChangelogH A D20-Oct-20133 KiB6349

MakefileH A D03-May-2022248 1510

READMEH A D13-Jun-19993.1 KiB7157

founts.cH A D20-Oct-201340.1 KiB2,4702,175

README

1This is my founts demo/program which was inspired by Eric's Cascade. I only
2saw the still images of Eric's Cascade and from those inferred what the
3program must be doing. I thought $39 for a screen saver which couldn't have
4taken more than a couple of weeks to write was a little out of line. That
5was the same price I paid for Riven and Starcraft--which had teams of people
6working for more than a year. Let's get real, Eric (et al).
7
8So here's my free equivalent. Maybe not all the bells and whistles, but
9the gyst is probably all there. I've not seen the original in action, just
10the still images.
11
12Eric got the idea from his friend at www.traipse.com. Lots of interesting
13ideas on that site but strangely no source is available and emailing the
14fellow doesn't help. In the spirit of sharing and generosity I'm making my
15program available for enjoyment and tinkering.
16
17Writing this program was a fun exercise. How do you model the world where
18the balls can collide with obstacles and bounce off? Trying to do it
19mathematically would be quite slow, where for each ball you'd have to check
20if it is inside any of the rectangles and if so do the bounce.
21
22The way I implemented it is probably the way Drew Olbrich did in his
23version. Comparing the two I think Eric just added some pretty colors rather
24than thin lines, and added sounds. Some other features like gravity wells and
25whatnot--as I said not really a lot of work went into it.
26
27I set up an array that corresponds to the dimensions of the virtual screen,
28and all the rectangles are rendered into it as triangles like this:
29aaaaaaaaaaaaaaaaaaaaaaa
30baaaaaaaaaaaaaaaaaaaaac
31bbaaaaaaaaaaaaaaaaaaacc
32bbbaaaaaaaaaaaaaaaaaccc
33bbbbaaaaaaaaaaaaaaacccc
34bbbbbdddddddddddddccccc
35bbbbdddddddddddddddcccc
36bbbdddddddddddddddddccc
37bbdddddddddddddddddddcc
38bdddddddddddddddddddddc
39
40It's a little more complicated but nevermind. In moving a ball, I check this
41bitmap for a collision. If the location is zero, there was no collision. If
42it is nonzero (as in a, b, c or d) I do a collision, and the number indexes
43into an array telling the orientation of the triangle. I only do collisions
44if the ball is moving towards the bumper, so I won't bounce an object inside
45the rectangle trying to escape.
46
47There is some limited color mixing. BTW to bring out a fountain or a
48rectangle you've got to grab the center marker on the object in the upper left
49area. To change the direction you've got to drag the off center marker. To
50change the color of a fountain drag it down to the color markers on the bottom
51left and it will take on the color touched. There is no way to delete fountains
52or rectangles yet.
53
54By hitting 'm' the fountains can blend their color. It's a complicated
55problem and I'm not entirely satisfied with the results, but it is kind of
56cool.
57
58By hitting 's' the program will switch to drawing a spiral, which causes a
59pretty slick effect if you stare into the center for a while, then look at
60something else. Hitting escape goes back to the fountains.
61
62By hitting 'a' the spiral is done with ants, which I thought might look neat.
63
64
65Anyway have fun.
66--Dave
67
68Dave Ashley
6913 June 1999
70http://www.xdr.com/dash
71