X-screensaver ports to Plan 9
Download: all hacks in a gzipped archive: xscr
News:
11/11/2007:
- Aki requested to add a benchmarking option. -b X will benchmark all hacks for X seconds
24/05/2007:
31/10/2006:
17/8/2004:
- New hack: pacman. As the name suggests, it plays a game of pacman. Use with -t to make it follow your mouse. Doesn't work well in drawterms (arc drawing problems).
- New hack: anemotaxis. Here's what the author has to say:
This code illustrates an optimal algorithm designed for searching a
source of particles on a plane. The particles drift in one direction
and walk randomly in the other. The only information available to the
searcher is the presence of a particle at its location and the local
direction from where particle arrived. The algorithm "explains" the
behavior of some animals and insects who use olfactory and directional
cues to find sources of odor (mates, food, home etc) in turbulent
atmosphere (odor-modulated anemotaxis), e.g. male moths locating
females who release pheromones to attract males. The search
trajectories resemble the trajectories that the animals follow.
13/7/2004:
- No more flicker! I finally learned how to avoid that!
- Sped up (or made more colorful):
whirlwindwarp,
wander,
petri,
nerverot,
mountain,
interference,
hyperglenda,
hypercube,
attraction,
spirograph,
slip,
sierpinski,
rorschach,
pyro,
hopalong,
helix,
demon,
deluxe,
anemone,
deco,
flow,
cloudlife,
halftone
and glenda.
28/6/2004:
- New hack: lyap. It visualizes a Lyapunov exponent. Not very fast (compare with the original -- xscreensaver's 'xlyap'). A tad prettier than its xscreensaver parent, though :)
- Sped up hacks such as julia by introducing an intermediate image to draw to, instead of driving directly to the screen (less locking).
25/6/2004:
16/6/2004:
4/1/2004:
- Fixed scrdump to use interpolation code from resample(1), now the images look much better (but it's slower :). See this very beautiful
screenshot.
4/1/2004:
- The following hacks' color palette was smoothed (instead of random):
- ccurve,coral,drift,fadeplot,flame
30/1/2004:
- New hack: starfish.
- Flow2 is now gone.
- All hacks now include plan9.h instead of defining things by themselves.
- Minor modifications to several hacks to make them more pleasant, cleaner or just right.
21/1/2004:
13/1/2004:
4/12/2003:
- Updated many hacks that lacked a proper flushimage().
- Julia now has proper colours
- Zoom now moves across the entire screen instead of just the top-left corner.
4/11/2003:
- New hack ready: glenda again a modification from hypercube. looks good only on fast displays (drawterm on hardware accelerated nvidia for example).
- Fixed flicker in hyperglenda.
3/11/2003:
- New hack ready: hyperglenda a modified hypercube for 9grid :)
23/10/2003:
- New hack ready: hypercube has very smooth rotation.
12/10/2003:
- New hack ready: petri, somewhat slow, but looks interesting.
- New hack ready: imsmap.
10/10/2003:
- Sped up the rd-bomb hack and added a smooth colormap. Unfortunately it sometimes breaks drawterm. Badly.
09/10/2003:
08/10/2003:
06/10/2003:
- Fixed a smooth-colormap issue with moire. Now the colors are much better looking and differ much less than the original xscreensaver ones. I needed this for the swirl hack (see next bullet), and had to backport it to moire -- it always irritated me. Note, if you still don't like the colors it's because they're converted through a CMAP8 colormap (corresponding to screen depth of 8 bpp).
- New hack ready: swirl. I think it's one of the coolest-looking hacks in xscr...
03/10/2003:
- Greatly simplified the screen grabbing routines --
getscr.[ch] are now replaced with a squeeze.h file which grabs
two images together and fits one to the other. To fit a
screengrab in a rio window therefore we just pass
display->image and screen to the routine. Very nice.
Hacks affected: scrdump, decayscreen, rotzoomer (rotzoomer is now much faster too), and slip.
- New hack ready: deluxe.
02/10/2003:
- New hack ready: popsquares. This one has a few surprises :)
- New hack ready: zoom. This one has a few surprises :)
01/10/2003:
30/09/2003:
29/09/2003:
- Added a '-c' (read 'continuous') option to scrdump -- now it takes a screendump every 1000 iterations, resulting in an almost-perfect 'picture in picture'. Worth for the hack value, only...
24/09/2003:
- Fixed squiral -- back when I did this hack I wasn't sure how much colors I want into this thing, so it was left b/w for the longest time. Now it's much better. It also resizes properly and clears the screen every 100000 frames :)
23/09/2003:
- Blaster now resizes properly.
22/09/2003:
08/09/2003:
- New hack ready: ripples. It
draws to a screen offline and does a loadimage()/draw(), so
it's fast over the network only when the window is reasonably
small...
- New hack ready: moire.
07/09/2003:
- New hack ready: fluidballs. Not as
good looking as I'd like, but fast. TODO: allow for a ball to be
moved with the mouse.
- Also fixed a bug in the above -- for some silly reason i was
offseting the window twice, so all balls bounced way before they
reached the upper-left corner.
- Made galaxy coloured by default.
06/09/2003:
- Converted all code to the Plan9 identation style. Result not
much better.
- Polyominoes now uses 'border' to draw the bounding box. I just
learned about it today.
- Fixed 'anemone' to look more like the original. It is now faster
too.
- Changed 'ifs' to use eruption's buffering method. Speed
improvement (in a default sized window) -- from 7 to 15fps.
05/09/2003:
- Added new port -- Polyominoes (only colours, no bitmaps,
but it looks great).
- Modified Eruption -- removed excessive calls to draw() with a
loadimage() at the end. it's very fast until the image becomes too
big and the network connection gets tapped. then it's slow again.
(would like to know how it fares on native terminals!)
04/09/2003:
- Added new port -- Eruption.
Included here are several ports of the XScreensaver hacks to
Plan 9... All programs are standalone and cannot, in their current state, be
run as screensavers (i.e. they will not run in fullscreen mode, unless you
resize them).
you can automate that by using the following invocation method (thanks to Russ Cox):
% fullscr=`{echo $vgasize | awk -Fx '{print "0 0 " $1 " " $2}'}
% window -r $fullscr maze
The fullscr variable holds the coordinates of a rectangle
the size of the entire screen, "window" then uses it to create a full screen
window to run 'maze' in it. warning: may not work as expected in drawterm if you've
resized it.
Compilation:
% hget http://mirtchovski.com/p9/xscr/xscr.tgz | gunzip | tar xv
% cd xscr && mk
% mk install
The files will be installed in $home/bin/$objtype/xscr; if you want to make
a global installation just move them to $objtype/bin/xscr.
Note that not all of the hacks have been ported correctly -- some of the earlier
ones lack color (strange.c), others have been modified slightly for lack of drawing
primitives in Plan 9 (for example I had to guess what XSegments are, hence Euler2d
looks slightly different than the original).
as usual -- suggestions fixes and comments are welcome...
Screenshots:
anemone.gif
anemotaxis.gif
attraction.gif
blaster.gif
boxfit.png
ccurve.gif
cloudlife.gif
coral.gif
critical.gif
decayscreen.gif
deco.gif
deluxe.gif
demon.gif
discrete.gif
drift.gif
eruption.gif
euler2d.gif
fadeplot.gif
flame.gif
flow.gif
fluidballs.gif
fuzzyflakes.gif
forest.gif
galaxy.gif
glenda.gif
halftone.gif
helix.gif
hopalong.gif
hypercube.gif
glenda.gif
imsmap.gif
interaggregate.gif
interference.gif
ifs.gif
julia.gif
lyap.gif
maze.gif
moire.gif
mountain.gif
munch.gif
nerverot.gif
../pacman/pacman.png
pedal.gif
petri.gif
polyominoes.gif
popsquares.gif
pyro.gif
rd-bomb.gif
ripples.gif
rorschach.gif
rotzoomer.gif
scrdump.gif
sierpinski.gif
slip.gif
sphere.gif
spirograph.gif
squiral.gif
starfish.gif
strange.gif
swirl.gif
thornbird.gif
triangle.gif
vermiculate.gif
vines.gif
wander.gif
whirlwindwarp.gif
wormhole.gif
zoom.gif
mirtchovski at gmail