|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: R T
Length: 2375 (0x947) Types: TextFile Names: »README«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/X/Xlife/README«
This is an interactive demo of John Conway's game of Life. This implementation was inspired by the one on a DEC Firefly. (We have only one Firefly, but lots of X workstations:-) I wrote it as a skeleton framework/demo on which people could base applications that they wanted to port quickly to X, which were basically single window things that took a few key/mouse commands, and did mostly continuous output. Usually, these applications had their own main loop, or suchlike, and couldn't call XtMainLoop. To do all the WM/Normal/IconHints, options, defaults stuff right without the Toolkit is cumbersome, but trying to do basic graphics requires Xlib calls. And everyone whom I gave the Xt documents came back shaking their heads saying "No thanks - we'll use the Tek window". Anyway, this attempts to answer the question How do I put up a window and draw stuff to it? but uses the Toolkit. xlife.c is interesting as a simple Tookit demo which does CONTINUOUS graphic output, and uses the SIGIO signal to process events. (expose, mouse). Much code stolen from contrib/gnuplot. xlife2.c uses ordinary event handling, processing events only between iterations. Simpler, but less responsive. Makes a neat game. Start it off, and try to kill off all life by adding cells while the game is running - you're not allowed to stop it in between except to answer the phone or suchlike :-). To compile, edit the Imakefile to define HAVE_RANDOM if you have it, and to uncomment the lines for xlife2 if you want that as well, make Makefile, make depend, and make. Try it with 'xlife -pat xlife.pat'. If you want, then 'make install'. Have fun. Send additions to the xlife.pat file, enhancements, fixes, comments, criticism etc. to Mark Moraes Computer Systems Research Institute, University of Toronto, Toronto, Canada M5S 1A4 {your favourite backbone}!utcsri!moraes moraes@utcsri.UUCP (new style) moraes@csri.toronto.edu moraes@csri.utoronto.ca moraes@csri.utoronto (bitnet)