The codeweasel hard at it Hopefully we'll get a few "good hack" contributions from him. Otherwise we'll only be dishing up bloatware and weaselware.


Favorite Movie Lines:

Evie: You lied to me.

Jonathan: I lie to everyone. What makes you so special?

Evie: I'm your sister.

Jonathan: That just makes you more gullible.

The Mummmy

Willy :)

Update: August 20, 2001

What's with WeaselWare?

Some are closet cross-dressers; some are boy-band wannabees; some want to shove their job up someone's ... stop it; some secretly aspire to hold absolute control over the inanimate objects that hold absolute control over their lives, i.e., computer programmers.

I place myself in the first, NO, I mean LAST! category. Whew! I'm not ready to bare everything yet. That's for the Back Door.

When I got my first computer back in '89 (Mac SE) I was first bitten by the programming bug - I've been plagued by programming bugs ever since. I got Think C and attempted to learn it. I wrote a whole lot of code, but was soon overwhelmed. It just took too much to write anything really useful that I guess I just gave up gradually until I'd completely forgotten about it.

But the wannabee bit again. Around that time Scoots (resident codemonkey) was getting fairly proficient with the Mac (he was probably 4 or 5) and wanted to do more than play The Manhole, Oids and other early Mac games. He wanted to start making things. So, we got Microsoft Quick Basic, a structured basic environment - no line numbers, just lots of functions. We wanted to make a game, duh!, and ended up making Paddle Ball. Basically, there was a ball bouncing around the window which you wacked with a paddle controlled by the mouse. It was pretty bogus and cheesy, but we thought it was really cool. After all, we made completely from scratch - our own custom code. I don't think there was any scoring, just a lot of smacking the ball. It was fun, for a while. Well, not really that much fun. We were then going to attempt a pinball game but couldn't figure how to make the ball follow an arc. That was about it for Quick Basic.

Time passed and the bug didn't: yup! bit again. This time C++. I learned a bunch more, conceptually, but again hit that wall of complexity: in order to make a standalone program, the task was daunting, immense, just plain overwhelming. I did make the much-lauded "RGB to Hex" conversion utility with it. Actually used for finding the hex triplets for HTML colors. You may have it if you like!

By now I'd developed a good conceptual understanding of functions, data types, structures, objects and all those cool things. I just didn't have any project to build that wouldn't take forever. I still dream though.

Then we moved on to RealBasic, an integrated, structured, object-oriented BASIC environment for the Mac. Here's where I finally made something complete - actually two somethings complete: MynSweep and The Game of Life. I sat down at the iMac and spent about three weeks at night with MynSweep - it became the first WeaselWorks offering, and overnight success - at least in my household, well, at least to me.

The Game of Life is something I've been intrigued with for years (ever since birth, hah, hah). I discovered it when delving into Chaos Theory and Complexity. I found this "science" both extremely facinating and impenetrable (thick as a brick): it's a quest / attempt to find predictibilty in complex, dynamic systems. Fractals is one area of study where extremely complex patterns can be derived from simple recursive equations.

The Game of Life acts out a closed, simple environment that obeys a few simple rules of behavior, watching the ebb and flow of population growth and decay: sort of like what happens when you introduce a non-native bird species into New York's Central Park (Starlings), or rabbits into Australia, or what happens when the coastal water temperature raises a few degrees because of a nuclear power plant's cooling system emptying into the ocean, killing some specific organism that turns out to be crucial to the food chain. With the starlings and rabbits, since they each had no natural predators in their no locale, they could reproduce in record numbers, displacing native species in the process.

But what about the game? Fine. Draw a grid, say 50 by 50 which gives you 2500 grid cells and put dots in some of the cells. Now devise some simple rules like (1) if cell is blank (dead) and it has 3 live neighbors (dots), make it alive (dot); (2) if cell has dot (alive) and has less than 3 or more than 6 live neighbors, it dies; (3) if live cell has 3, 4, 5 or 6 neighbors, it keeps living. Now, overlay another grid and apply the rules (of course, this becomes really time-consuming by hand; that's why we have computers), and watch how the population grows or dies. Rule (1) implies spontaneous birth when surrounded by enough enough living cells (or souls) to nuture it. Rule (2) that a system can only support a finite population: too few and the cell dies of loneliness, too many it dies from overcrowding. Rule (3) implies that just the right ingredients/proportions equal continued life.

The true pioneers of cellular automata - the general category of this type of thing - would spend countless hours discerning pattens and behaviors. They then graduated to fluid dynamics, complexity, chaos (not Maxwell Smart) and Santa Fe. In the meantime they categorized a number of pattern/objects, one of which is the glider. The glider is a self-contained organism that heads off on one of the diagonals merrily on its way, heedless of anything except another object which would tend to consume / absorb / annihilate it. After watching for a while, you start keeping score and shouting out when a glider appeares, and with equal passion upon its demise. They aren't all that common naturally, but they are easy to construct when setting up the initial environment. One pleasant scenario is to set up a slew of gliders aiming at each other and, like a cock fight or pokemon battle, and see who comes out alive. I'm a degenerate, I know.

Every book on complexity and chaos talked about this game. It was developed by the first computer programmers, a precursor to computer games, because it was much more fun than cruching numbers. I, too, became enamored by it conceptually but never saw it in action. So, after Mynsweep I tackled the game of life. And it works! Albeit slowly. But all the classic behaviors talked about were acting out their engaging drama right there on my screen! I was thrilled, and it does become habit-forming. Check it out - if you have a Mac. Someday I'll get around to recompiling it for PC. After making my own version, I got the crazy idea of searching the net for it: low and behold, there are a slew of them - mostly all for PC. I checked out at least one that ran like lightning - it was cool, but not as cool as mine, just faster.

That's about it for my contributions to hacking. Scoots, however, has taken the initiative and raise the bar: Now he uses CodeWarrior (C & C++) as well as RealBasic, creating all sorts of utilities and applications that help him build game levels. I'll try to get him to post a few, just to fill up the page.

Weasel Ware
MynSweep
Game of Life
RGB to Hex
HTML Color Chart

At this point the games are Mac-Only. RGB to Hex might work. The color chart is HTML so there shouldn't be a problem.

Here it is:
MynSweep in all its glory.

Download it if you dare.


Here's an HTML color chart with the Netscape colors. It's a nice resourse I made a couple years ago, printed in color and then promptly forgot about it (the on-screen version, that it. I generally just lose the printed hard copy.).

Color Chart
Oooh! Pretty!


Now this little number is truly a hack, ugly hack at that. But it served its purpose: converting an RGB triplet into a Hex triplet for HTML code. I works for me, though I haven't used it for quite a while. So, take it; it's yours.

RGB_HEX


The Game of Life is going to take a while to get ready. I just looked it over (actually played with it for a while - it is consuming!) and realized it wasn't complete. So hang in there.

Want to keep up on Weaselworks happenings? New music? Videos? Join the email list? It's easy. Just click!

Go for it!

To the top

WeaselWorks  |  Tunes  |  Videos  |  Words  |  Software  |  Stuff  |  The Weasels  |  Willy's Picks  |  TBGraphics

Blah, blah and a whole bunch of more blah, blah.  |  All text, images, video, and music ©2000-2001 WeaselWorks
Wayward Willy