[HEA] _____________________ ___ _ |___ ______________| | | | | | | _ | | | | | || | | | | | | || | | | | | | || | | | ____ _ _ _ _ ______ | | | || | | | / __ \ | | / \_/ \ | ___ \ | | | || |__ ____ | | / / \ | | /\ /\ \ | | \ \ | | | || _ \ | _ \ | | \ \__/ | | | |_|| | | |__/ / | | | || | | || |_|| | | \___/|_| |_| |_| | ____/ |_| | || | | || |__ | |____________________ | | _ |__||_| |_|\____/ |________________________| | | |_| | | Lighting Your Apple II Path | | |_| ----------------------------------- >>> WELCOME TO THE LAMP! <<< ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ THE BEST OF THE A2 BULLETIN BOARD ON Syndicomm Online "Teaching the Apple II user how to fish since 1998" :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: The Lamp! An Onipa'a Software Production Vol. 8, No. 2 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Publisher................................Ryan M. Suenaga, M.S.W., L.S.W. Editor.....................................................Lyle Syverson Internet Email, Publisher.........................thelamp@sheppyware.net Internet Email, Editor................................lyle@FoxValley.net :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: TABLE OF CONTENTS ~~~~~~~~~~~~~~~~~ February 15, 2005 HIGH ABOVE THE ROCK RIVER---------------------------------------------[OPN] Signs of Spring Signs of KansasFest A2 FORUM AT Syndicomm Online (A2Central.com) DISTILLATIONS------------[DAS] THE Commodore 64 DTV Connection----------------------------------[CDC] New File in the A2 Library---------------------------------------[NFL] Apple Computer, Inc. Has Very Good Quarter-----------------------[VGQ] Computer Science - Looking Back----------------------------------[CSB] Using the MacIP Link Layer Module for Marinetti------------------[LLM] Hitchhiker's Guide to the Galaxy---------------------------------[HGG] Mac Mini in Apple II Case?---------------------------------------[MMA] Cost of Storage--------------------------------------------------[COS] ORCA/C - Support for Inline Procedure Names----------------------[IPN] Juiced.GS Subscription Renewals----------------------------------[JSR] Lucas Updating His WebPage---------------------------------------[UWP] Another Great Programmer's Chat----------------------------------[APC] Help Programing a Game-------------------------------------------[HPG] Silver Platter - Web Server on a IIgs----------------------------[SPS] ILLUMINATING THE LAMP-------------------------------------------------[ITL] An overview of GEnieLamp A2 and The Lamp! To be Continued ANNOUNCEMENTS FROM SYNDICOMM------------------------------------------[ANS] To Sign up for Syndicomm Online----------------------------------[TSU] February 2005 Issue of Syndicommotion Available------------------[FIA] LETTERS TO THE EDITOR-------------------------------------------------[LTE] No Letters to the Editor This Month An Invitation KFEST 2005------------------------------------------------------------[KF5] KFest Registration Due to Open March 1---------------------------[KFR] In Anticipation of KansasFest 2005-------------------------------[AKF] Wife Might Allow Attendance at KansasFest------------------------[WMA] Wee Hours Run For Food-------------------------------------------[WHF] KansasFest 2005 to be Held July 19-24th--------------------------[TBH] KansasFest Website-----------------------------------------------[KFW] EXTRA INNINGS About The Lamp! ------------------------------------------------ [INN] [*] [*] [*] READING THE LAMP! The index system used by The Lamp! is designed to make """"""""""""""""" your reading easier. To use this system, load this issue into any word processor or text editor. In the index you will find something like: EXTRA INNINGS About The Lamp! ------------------------------------------------ [INN] To read this article, simply use your search or find command to locate [INN]. There is a similar tag at the end of each article: [EOA]. [OPN]------------------------------- HIGH ABOVE THE ROCK RIVER | ------------------------------------ From The Editor """"""""""""""" by Lyle Syverson Signs of Spring ~~~~~~~~~~~~~~~ The local Groundhog, having seen his shadow on February 2, has declared that there will be six more weeks of winter. (On the other hand, had he not seen his shadow, there would have been forty two more days of winter.) The unseasonably warm days have melted most of the remaining snow. There is a definite hint of Spring in the air. Time to walk by a certain house. The occupant has planted an assortment of Snow Crocus bulbs close to the foundation on the south side of his house. The rich, black soil next to the house has been warmed by the sunshine and by the heat from the foundation. The Crocus bulbs have been signaled by the temperature of the soil to send up shoots... a sure sign that Spring is not far off. Signs of KansasFest ~~~~~~~~~~~~~~~~~~~ It appears that KFest registration will open on March 1. (See the KFest 2005 section of this issue for more information). [EOA] ASCII ART BEGINS _________ _ _ _ |__ __| | | | | | | | | | | | | | | | | | |___ ____ | | _____ __ ___ _ _ _____ | | | | | ___ \ / __ \ | | /____ \ | v v | | v ___ \ | | | | | | | | | /__\ \ | | ____| | | /\ /\ | | / \ \ | | | | | | | | | _____| | | / ___ | | || || | | | | | |_| | | | | | | | |_____ | |____ | |__| | | || || | | \___/ / _ |_| |_| |_| \______| |______| \____^_| |_||_||_| | |\____/ |_| | | | | |_| ASCII ART ENDS [EOA] [DAS]---------------------------------------------- DISTILLATIONS FROM The A2 FORUM at Syndicomm.com | (A2Central.com) | --------------------------------------------------- by Lyle Syverson [CDC] THE Commodore 64 DTV CONNECTION """"""""""""""""""""""""""""""" FWIW, the Commodore 64 DTV (the joystick created by our buddy Jeri) is now available at KB Toys, at least in person (there were some in the mall here but I couldn't find any at http://kbtoys.com/) Ryan Chief Sysop and Head Geek (A2.RYAN, Cat 2, Top 8, Msg 513) [EOA] [NFL] NEW FILE IN THE A2 LIBRARY """""""""""""""""""""""""" There is a new upload in the utilities/prodos8/date_and_time_utilities directory: File: ezupdater.bxy Size: 1664 Date: Jan 3 EasyDrive, a freeware release from QLabs, is a disk management suite for hard drives and other large media. As distributed, the date code in the top bar is hard-coded to display "19" for the century digits. Mark Percival has written an easy-to-use BASIC program that will change these digits from "19" to "20" for proper date display. Place the BASIC file EZUPDATER in the same subdirectory as the EASYDRIVE bin program and then run the BASIC file. (You may want to save the original file as ORIG.EASYDRIVE just in case.) From that point on, the date bar at the top of the menu will display the proper date. Note that this patch is only good for this century, so if you're going to be using your Apple II and EasyDrive 95 years from now, a new patch program will be necessary. Please note that the EasyDrive software must be distributed in it's original form, and the date code must be altered by the end-user. This is in keeping with the freeware agreement under which QLabs released this software. Tony Ward, A2 Librarian (A2.TONY, Cat 2, Top 37, Msg 52) [EOA] [VGQ] Apple Computer, Inc. HAS VERY GOOD QUARTER """""""""""""""""""""""""""""""""""""""""" Apple Computer, Inc. reported its most profitable quarter ever on Wednesday. Stock of the company (ticker AAPL) is up more than 11% in after hours trading. Ryan Chief Sysop (A2.RYAN, Cat 4, Top 3, Msg 11) [EOA] [CSB] COMPUTER SCIENCE - LOOKING BACK """"""""""""""""""""""""""""""" Here's a poorly-framed question. I teach 11th grade English composition in a high school that includes a one-hour, twice-a-week computer science course in its curriculum. I've suggested to the faculty that the teachers "switch" for a day - for example, the math teacher teach physics, the physics teacher teach humanities, etc. I would like to teach computer science, and draw on my Apple II background to expose today's youth to that machine and its environment. But how to do so? The school has multiple PCs available, but I cannot legally copy my IIgs's ROM to each one to run emulators. What Apple-related activity can I introduce to the kids using Windows machines? There is a Windows version of the text-based game "Adventure" available at , but that's not in the school's spirit of barring game-playing on school computers. Thoughts? -Ken (KGAGNE, Cat 6, Top 7, Msg 1) >>>>> """"" Although I can't quote any resources for you to refer to, I've seen more than one comment noting that the "adventure" game format has genuine educational merit, particularly the earlier text-based versions. In the case of the original Colossal Cave adventure, I think you could make a strong case for presenting it in an educational setting. (Obviously the big concern would be limiting the amount of time spent on the purely entertainment side of it.) The program was ground breaking in many ways. It was huge! It had early text compression and interpreter-based design. It had one of the first publicly available "language parsers" (primitive and all as it was). The text was rich and complex, with roots in the Tolkien tradition. It required the user to think laterally and make connections - which should be a "subject" taught in all schools! On the other hand, the Apple II implementation was just one of many, so I'm not sure how well it fits with your plans there. Peter peterw@syndicomm.com Palm OS Community Bulletin Board Manager (PETERW, Cat 6, Top 7, Msg 2) >>>>> """"" Peter, I think I'll need to think laterally myself in order to teach a class I'd like to teach. In this case, "classic computing" might be a more feasible and effective approach than Apple II specifically. I'll think about what you've said... Thanks! -Ken (KGAGNE, Cat 6, Top 7, Msg 3) >>>>> """"" Ken, Maybe the thing to do is teach a little "History of Personal Computing" during that hour - tracing, say, the evolution of the spreadsheet as a case study. Visicalc, (which you can explain was originally written for the 16K Apple ][ ) is actually available for download for the PC. If you could dig up a DOS-based copy of Lotus 1-2-3, and then finally show them Excel, they might get a nice idea how far we've come. Some related links: http://inventors.about.com/library/weekly/aa010199.htm http://www.webopedia.com/TERM/V/VisiCalc.html http://www.bricklin.com/history/vcexecutable.htm _________ | homas (TCOMPTER, Cat 6, Top 7. Msg 4) >>>>> """"" I posted my original query on a whim, after weeks of meaning to. It's proven to be timely, as I may be substituting for the computer science teacher next week! Gulp. I've found copies of Adventure and VisiCalc that I can install (freely and legally) on the school computers. Perhaps I can whip up something in a rush using that. -Ken (KGAGNE, Cat 6, Top 7, Msg 5) >>>>> """"" There's a lot of value in a good text adventure game; they teach logical thinking, reading, and attention to detail. In particular, some of the crime solving games like The Witness are very good for this sort of thing. Eric "Sheppy" Shepherd sheppy@syndicomm.com Owner, Syndicomm http://www.syndicomm.com Building communities, bit by bit. (SYNDICOMM, Cat 6, Top 7, Msg 6) >>>>> """"" I thought Adventure, like British Legends, would give a list of all the potential directions for exit from the current room by using the "exits" command - but there is no such command. That makes it much more difficult, IMHO, since the verbose description of each room does not necessarily say "there is a river to the east", only "there is a river nearby". Hmm. -Ken (KGAGNE, Cat 6, Top 7, Msg 7) >>>>> """"" Does anyone know of a good spreadsheet exercise I can give the students in VisiCalc? For example, "Here is some data; enter and manipulate it in a spreadsheet thusly." FWIW, I found a review of Cdex, a VisiCalc tutorial, at . -Ken (KGAGNE, Cat 6, Top 7, Msg 8) >>>>> """"" The Infocom games are typically much, much better about ensuring that room descriptions indicate where all the exits are than any other adventure games I've ever seen. It helps to turn on VERBOSE mode, so you see room descriptions each time you enter. Eric "Sheppy" Shepherd sheppy@syndicomm.com Owner, Syndicomm http://www.syndicomm.com Building communities, bit by bit. (SYNDICOMM, Cat 6, Top 7, Msg 9) >>>>> """"" In the original adventure the idea was that you *explored*. That is, you always tried all directions in a room including up and down (offhand I can't remember if NE, SE, NW, SW work). You were also expected to make a map. And entering room B by going North from room A did not always mean that going South from Room B would take you back to Room A! It really was meant to be much more of an "adventure" than some of the later programs. Although Infocom did indeed have the balance pretty right. (BTW, there are many Infocom (and 3rd party) games available for download using Z-machine interpreters written for just about any platform you care to name - including my Palm PDA!) Ken, have you actually played Colossal Cave? If not, it might be worth searching for a hint sheet to help you help the students to make some progress. It would defeat the purpose if they got bored too quickly. I can answer most questions (memory permitting!), but the turnaround time might be a bit slow! Peter peterw@syndicomm.com Palm OS Community Bulletin Board Manager (PETERW, Cat 6, Top 7, Msg 10) >>>>> """"" Peter, I don't think I have played Colossal Cave extensively, but I will do so today (with cheat sheets), and will give the students graph paper when I send them into the adventure. :) Thanks, -Ken (KGAGNE, Cat 6, Top 7, Msg 11) >>>>> """"" Ken, Don't get lost in the maze of twisty little passages, all alike! :-) Peter peterw@syndicomm.com Palm OS Community Bulletin Board Manager (PETERW, Cat 6, Top 7, Msg 12) Today I had the students using VisiCalc. The way the school works, I got to teach the computer science class four times throughout the day, and each one went more smoothly. I started with some history of the software and hardware, listing how many kilobytes various media are (hard drives, DVDs, CDs, floppies), and showing that VisiCalc was smaller than today's FoxTrot comic strip. The students lacked perspective on some matters; after I showed that VisiCalc was 22K, I asked how much memory the computer it was for had. 16MB was a common guess. They were rather stunned that it was only 16K! "VisiCalc shipped for the Apple II, a machine created by what two people?" I asked. The students responded quickly with "Steve Jobs", but had never heard of the other guy, even after I gave his name. I quickly incorporated some KFest pictures into the lesson after that. (They'd never heard of VisiCalc either; several students guessed the first spreadsheet program ever was Excel!) I then assigned this exercise: 1. A standard checkbook ledger looks like this: Check # Date Description Deposit Payment Balance --------------------------------------------------------------- 40,000 250 1/31 WPI 22,000 -22,000 tuition 18,000 2/01 deposit 1,984 1,984 tax refund 19,984 Create a sample checkbook ledger with at least four expenses, two deposits, and one ATM withdrawal. As they progressed through the assignment, I also had them left justify the Check column, apply a currency format to the Balance column, and lock the first row as a title. I predicted the trouble the students would have with the program - no mouse, no menu bars, etc. One girl apparently confused the Blank and Clear commands, and erased her entire spreadsheet (this, of course, being before "Undo" commands!). But I hadn't anticipated the trouble they would have with the mathematics. Most of these students are too young to have their own checkbooks, and a few needed some help to understand that Balance = Previous Balance + Deposit - Payment, and how to represent that using cell values. I'd preceded the exercise with demonstrating that paper spreadsheets don't automatically recalculate their cells, which is why a computer made things so much easier in 1979. But some students manually entered all their numbers, which of course resulted in the spreadsheet not updating when I tested it by changing the deposit and payment values. Other students created a balance column that acknowledged either a deposit or a payment, depending on which one they'd entered; that failed when I changed the deposit to a payment. ("But you can't have both!" they'd say; "I don't care, and neither does the balance column. It should be prepared for anything you throw at it.") I expected the students to spend 30 minutes on the exercise before moving on to their homework, but many used all 45 minutes and even then some weren't finished. (I also challenged the students to determine the quit command - no, not "Q", but "/SQY". How obtuse! :) Some students didn't see any relevance to this exercise, and one girl who's had a bad week (academically) was nearly in tears, saying "This is beyond me!" But two students grasped this program very quickly, distinguished between values and labels, and applied some very elegant equations and formula. I'm not sure if these are kids who grew up with Lotus 1-2-3 or not. :) An interesting and surprising exercise. I'm not sure if they learned more about the history of technology, how to use a spreadsheet, or basic mathematics and logical thinking. I just hope they learned something. Thanks for the help and suggestions, everyone! I never would've known this program was available for Windows if not for your post, Thomas. -Ken (KGAGNE, Cat 6, Top 7, Msg 13) >>>>> """"" Some lessons are going to be experiments. As experiments go this sounds like it needs work. But with a little fine tuning you could try it again. I remember doing some things like this. The real world of science is truly like this. Everything is not all ironed out and step by step. It seems you identified some of the "naturals". They may be the type that thrive with a little disorganization as well as math and logic. Bruce (BBAKER, Cat 6, Top 7, Msg 14) >>>>> """"" Bruce, Any suggestions you might have for fine-tuning the experiment would be greatly appreciated! -Ken (KGAGNE, Cat 6, Top 7, Msg 15) [EOA] [LLM] USING THE MacIP Link Layer Module for Marinetti """"""""""""""""""""""""""""""""""""""""""""""" What kind of success have people had using the MacIP Link Layer module for Marinetti? Ryan Chief Sysop (RSUENAGA, Cat 11, Top 15, Msg 60) >>>>> """"" I don't have the hardware to run Mac IP. It's only ethernet for me. Geoff (GEOFF, Cat 11, Top 15, Msg 61) [EOA] [HGG] Hitchhiker's Guide to the Galaxy """""""""""""""""""""""""""""""" It's not Apple II-compatible, but the 1984 Hitchhiker's Guide to the Galaxy is available online at this URL: http://www.bbc.co.uk/radio4/hitchhikers/game/guide.swf (KGAGNE, Cat 14, Top 1, Msg 115) [EOA] [MMA] Mac Mini in Apple II Case? """""""""""""""""""""""""" Is the Mac Mini small enough to house in an Apple II body/case? -Ken (KGAGNE, Cat 17, Top 1, Msg 1) >>>>> """"" It is about the size of a Apple IIGs 5 1/4 drive so yes you could. (TECHNERD, Cat 17, Top 1, Msg 2) >>>>> """"" The official size of the Mac mini is 6.5 inches wide by 6.5 inches deep by 2 inches high as per http://www.apple.com/macmini/specs.html There's a picture on iPodlounge.com in their (excellent) Mac mini review with a DVD or CD-ROM being inserted into the optical drive in the mini, to give you some reference. It's small enough to fit without any modification into any non-IIc Apple II. It would be quite an interesting experiment (right now expensive too :) to try to get one into the IIc case, with the IIc keyboard still being usable and the optical drive where the IIc floppy is. Ryan Chief Sysop (A2.RYAN, Cat 17, Top 1, Msg 3) >>>>> """"" I think you could put a Mac mini inside an Apple II case without taking the mini out of its own enclosure. :) Eric "Sheppy" Shepherd sheppy@syndicomm.com Owner, Syndicomm http://www.syndicomm.com Building communities, bit by bit. (SYNDICOMM, Cat 17, Top 1, Msg 4) [EOA] [COS] COST OF STORAGE """"""""""""""" I just spent $5 on a 32-megabyte USB drive. How much would that much storage have cost me 15-20 years ago? And how long would it have lasted me? (32MB is the equivalent of 234 5.25" floppies, or 40 3.5" floppies) -Ken (KGAGNE, Cat 19, Top 1, Msg 4) >>>>> """"" I spent $650 for a 100MB SCSI drive in 1990-1991 from Open-Apple. It's still my main hard drive on my GS, although a 127MB hard drive I got from Quality Computers a few years later for about $200 just started that "stiction" problem. -Jeff (FINKSTERJ, Cat 19, Top 1, Msg 5) [EOA] [IPN] ORCA/C - SUPPORT FOR INLINE PROCEDURE NAMES """"""""""""""""""""""""""""""""""""""""""" I was fooling around with the orca/c source code this afternoon and added support for inline procedure names (which gsbug and niftylist recognize). You can find the diffs necessary here: http://www.syndicomm.com/~kws/cc/ Kelvin (KWS, Cat 22, Top 5, Msg 19) >>>>> """"" Kelvin, dude, that's cool. :) Eric "Sheppy" Shepherd sheppy@syndicomm.com Owner, Syndicomm http://www.syndicomm.com Building communities, bit by bit. (SYNDICOMM, Cat 22, Top 5, Msg 20) [EOA] [JSR] Juiced.GS SUBSCRIPTION RENEWALS """"""""""""""""""""""""""""""" If you haven't renewed your Juiced.GS subscription, don't forget to do it soon! Eric "Sheppy" Shepherd sheppy@syndicomm.com Owner, Syndicomm http://www.syndicomm.com Building communities, bit by bit. (SYNDICOMM, Cat 23, Top 2, Msg 644) >>>>> """"" I'm now pretty confident that the first issue of Volume 10 will ship at the end of this month. If you haven't resubscribed, now is the time. Ryan Chief Sysop, Syndicomm A2 Editor-in-Chief, Juiced.GS (A2.RYAN, Cat 23, Top 2, Msg 647) [EOA] [UWP] Lucas UPDATING HIS WEBPAGE """""""""""""""""""""""""" I've been starting to update some content on my webpage: http://iigs.dreamhost.com and have also added a BLOG. Recent additions are revisions to the published GTE API and a work-in-progress, in-depth description of the GTE blitter and sprite code. -Lucas (LSCHAREN, Cat 50, Top 5, Msg 40) [EOA] [APC] ANOTHER GREAT PROGRAMMER'S CHAT """"""""""""""""""""""""""""""" We had a nice programmer's chat again tonight. Lots of discussion about code source repositories (if not actual open source and CVS at this point). Also of discussion was an Internet Configuration CDev, which has been discussed somewhat before. Not of discussion was Geoff's previous idea on filetypes linked with dot three filename suffixes. Sadly, my own projects are currently backburnered. Hopefully they will come around someday soon... Ryan Chief Sysop (A2.RYAN, Cat 50, Top 5, Msg 41) >>>>> """"" Any chance of transcripts of the Monthly Programmer Chats being made available? Just curious.... -Lucas (LSCHAREN, Cat 50, Top 5, Msg 42) >>>>> """"" If Kirk kept a transcript, then yes. I would keep one myself but I can't get home in work early enough to make the start of the chat. Ryan Chief Sysop (A2.RYAN, Cat 50, Top 5, Msg 43) >>>>> """"" I saved a transcript. I'll just have to edit and massage it some, then I'll upload. Kirk (A2.KIRK, Cat 50, Top 5, Msg 44) [EOA] [HPG] HELP PROGRAMING A GAME """""""""""""""""""""" I guess I'll ask this here because, well, I haven't asked here before. :) I'm stuck at a point in a game I'm developing, which I hope to release (someday) for both Apple IIGS and Palm. The game is a hex-grid, turn-based wargame inspired by "Panzer General" which I enjoyed very much for it's easy to use interface. A word of explanation may be in order, for those that have not played the game: In Panzer General, and its sibling games, when you click on a unit on your map, all the hexes to which you can move (limited by movement points vs. terrain costs) are shaded. You then just click on the desired shaded hex, and the unit moves there. I'm trying to duplicate that point and click interface, but have a problem with the algorithm for figuring out which hexes should be shaded. The complication is in the fact that different hexes have different movement costs associated with them, so it's not as simple as just counting out X hexes from the current one. I've found descriptions of algorithms for finding the shortest path from one given point to another, and for figuring out how many movement points it would take to get there, but not one for figuring out how far you can get with a fixed number of movement points. The algorithm has to be doable in either Basic or C. Can anyone give me any hints, or point me to a website that has such a description? Thanks. _________ | homas (TCOMPTER, Cat 55, Top 2, Msg 1) >>>>> """"" If you're willing to forgo a number of color options, you could do something sneaky: Set your palette so that you have several color table entries that all look like your background color. Use each color in such a way that no two tiles that share an edge have the same color. Then when there's a click, you can figure out the general area in which the click occurred based on the cursor position and the radius of the tiles, then you can look at the pixel at the cursor position to tell which tile was clicked. Eric "Sheppy" Shepherd sheppy@syndicomm.com Owner, Syndicomm http://www.syndicomm.com Building communities, bit by bit. (SYNDICOMM, Cat 55, Topic 2, Msg 2) >>>>> """"" I would go for a recursive approach. Starting from your initial square (hex), recurse on all adjacent squares, decrementing the movement cost, until you can't move any more. If it's a valid square, hilite it (or store it in an array or whatever). eg psuedocode: CheckSquare(int x, int y, int movesLeft) { // verify valid coordinates. if (x < 0 || x > MAX_X) return; if (y < 0 || y > MAX_Y) return; moveCost = .... // determine how many moves are required. // hilite the square since we know it's valid. HiliteHex(x,y); movesLeft -= moveCost; if (movesLeft <= 0) return; // can't move further // now check all adjacent squares. CheckSquare(x + 1, y, movesLeft); CheckSquare(x + 1, y + 1, movesLeft); CheckSquare(x + 1, y - 1, movesLeft); CheckSquare(x - 1, y, movesLeft); CheckSquare(x - 1, y + 1, movesLeft); CheckSquare(x - 1, y - 1, movesLeft); CheckSquare(x, y + 1, movesLeft); CheckSquare(x, y - 1, movesLeft); } That's the general idea. I'm assuming your lined up as such: * * * * o * * * * and can move from the center to any of the 8 surrounding squares. Adjust the recursion if not. Kelvin (KWS, Cat 55, Top 2, Msg 3) >>>>> """"" I really like Kevin's recursion suggestion since I wouldn't have thought of that (and it is very obvious that it will work). The only problem is that it doesn't scale well for large hop-counts. A quick calculation shows that counting up to six spaces away on a hex grid can produce up to 46,656 (6^6) recursion calls before getting an answer (using Kelvin's square grid example, there would be up to 262,144 calls). Take a look at http://www-cs-students.stanford.edu/~amitp/Articles/HexLOS.html for your necessary algorithms within a hex world. The best solution follows the logic which Tom was suggesting. BTW, I found this site in less than 2 minutes of searching by using the Google key words of: "hex grid" algorithm Geoff (GEOFF, Cat 55, Top 2, Msg 4) >>>>> """"" Thanks for the suggestions, guys. The problem with using recursion (besides the size problem) is that NSBasic doesn't handle recursion at all. I COULD try to figure out how to write a C library to interface with NSBasic, but that's another whole learning curve to climb :) Meanwhile, the recursive approach might work for the IIGS, although I don't know if GSBasic supports recursion either. Nevertheless, I could write the IIGS version in C or pascal, I suppose. Anyway, thanks again for the tips! _________ | homas (TCOMPTER, Cat 55, Top 2, Msg 5) >>>>> """"" I hope you're using GSoft, not GSBasic (from Apple) :) GSoft supports recursion -- see the "towers of hanoi" example. Kelvin (KWS, Cat 55, Top 2, Msg 6) >>>>> """"" I should be trivial to implement a recursion-type of routine: x and y is the point where the user clicked xadjust and yadjust is the adjustment to the axis location when popping from recursion. xhome and yhome is the point where the user's piece is located found =1 means we know the click is valid. count= the maximum number of hops 99 rem stuff here. 100 xadjust=0: yadjust=0: found=0: gosub 1000 110 rem more stuff here 1000 rem for laziness, assume a square grid with no diagonals. 1005 count=count-1 1010 if found=1 then goto 1100 1020 if x=xhome and y=yhome then found=1: goto 1100 1025 if count=0 then goto 1100 1030 x=x-1:xadjust=1:y=y-1:yadjust=1:gosub 1000 1040 x=x+1:xadjust=-1:y=y-1:yadjust=1:gosub 1000 1050 x=x-1:xadjust=1:y=y+1:yadjust=-1:gosub 1000 1060 x=x+1:xadjust=-1:y=y+1:yadjust=-1:gosub 1000 1100 x=x+xadjust:y=y+yadjust:count=count+1:return This isn't tested, but it looks right. No effort was made to reduce the number of recursions of 4^count--I'll leave that as an exercise for the reader. None-the-less, BASIC can handle recursive routines with no problems. Geoff (GEOFF, Cat 55, Top 2, Msg 7) >>>>> """"" I see someone made a reply while I was writing mine. I was actually assuming Applesoft BASIC when I wrote my code, but it is applicable for just about any BASIC that support GOSUB (which NSBASIC does support). Geoff (GEOFF, Cat 55, Top 2, Msg 8) >>>>> """"" Yes, I certainly meant GSoft. :) And thanks for the pseudocode examples. They'll be a big help. This is a great place! :) _________ | homas (TCOMPTER, Cat 55, Top 2, Msg 9) [EOA] [SPS] Silver Platter - Web Server on a IIgs """"""""""""""""""""""""""""""""""""" Silver Platter is a New Desk Accessory (NDA) that turns your Apple IIgs computer into a web server. Once configured, you can access files on your Apple IIgs using any web browser. You can serve up an entire web site, or you can serve up files and folders. It's great for transferring files easily from your Apple IIgs to your Macintosh, PC, or other computer. The best part: you can serve up files from your Apple IIgs while continuing to use your favorite software! Silver Platter is easy to set up and use, and costs just $5. You can buy it either as a download or (soon) on floppy disk from the Syndicomm Online Store. Silver Platter was written by respected Apple II programmer Kelvin Sherlock (of GShisen fame) and is distributed by Syndicomm under license. You can get more information on Syndicomm's web site at: http://www.syndicomm.com/products/silverplatter Eric "Sheppy" Shepherd sheppy@syndicomm.com Owner, Syndicomm http://www.syndicomm.com Building communities, bit by bit. (SYNDICOMM, Cat 24, Top 37, Msg 1) [EOA] [ITL]------------------------ ILLUMINATING THE LAMP | ----------------------------- An overview of GEnieLamp A2 and The Lamp! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To be Continued """"""""""""""" Note from October 2004 issue: I'll say goodbye for now, but I'm not fading away as I did in 1995. I'll return some time next year to do another couple of Illuminating The Lamp columns for 2003 and 2004. Steven Weyhrich a2history@syndicomm.com http://apple2history.org [EOA] [ANS]------------------------------- ANNOUNCEMENTS FROM SYNDICOMM | ------------------------------------ by Lyle Syverson [TSU] TO SIGN UP FOR SYNDICOMM ONLINE """"""""""""""""""""""""""""""" Please visit our web site at http://www.syndicomm.com for information or to sign up! (Logon message) [EOA] [FIA] February 2005 Issue of Syndicommotion Available """"""""""""""""""""""""""""""""""""""""""""""" The February 2005 (Volume 4, Number 2) issue of Syndicommotion has been emailed to subscribers. The HTML edition can be found online at the following URL: http://www.syndicomm.com/syndicommotion/v4n2.html or by selecting menu option #1 from Page 155 on Syndicomm Online (type "m155;1" without the quotes at any menu prompt). -Ken Gagne Editor, Syndicommotion (KGAGNE, HelpDesk, Cat 5, Top 4, Msg 28) [EOA] [LTE]------------------------------- LETTERS TO THE EDITOR | ------------------------------------ NO LETTERS TO THE EDITOR THIS MONTH """"""""""""""""""""""""""""""""""" The mail box for Letters to the Editor remained empty this month. [EOA] AN INVITATION ~~~~~~~~~~~~~ Express your opinions about the comings and goings in the world of the Apple II computers. Send your comments to Lyle Syverson, Editor The Editor reserves the right to edit any material submitted. The Editor reserves the right to reject any material he considers unsuitable for publication in _The Lamp!_. [EOA] [KF5]------------------------------ KFest 2005 | ----------------------------------- [KFR] KFest Registration Due to Open March 1 """""""""""""""""""""""""""""""""""""" I haven't seen anything posted to the KFest mailing list since Devin Reade's message on 22-Dec. I've been out to the KFest web site and there doesn't appear to be a registration form available or any status posted. Erick (Erick Wagner, KFest Mailing List, Feb 11, 2005) >>>>> """"" KFest registration is due to open on March 1. We updated the web site to say so a couple of days ago, although we didn't call special attention to it. Sheppy (Eric Shepherd, KFest Mailing List, Feb 11, 2005) [EOA] [AKF] IN ANTICIPATION OF KansasFest 2005 """""""""""""""""""""""""""""""""" In anticipation of many late nights and fine meals at KFest 2005, I've set this wonderful photo as my work computer's desktop/wallpaper: http://www.kfest.org/gallery/view_photo.php?full=1&set_albumName=There-and- Back-Again&id=DSCN1729 (KGAGNE, Cat 5, Top 7, Msg 24) [EOA] [WMA] WIFE MIGHT ALLOW ATTENDANCE AT KansasFest """"""""""""""""""""""""""""""""""""""""" Kfest Rocks...I really hope my wife let's me come this year. Make no bones about it..it's her decision. I'm not sure Alivia (not Avila) is ready for Kfest:) Dain (A2.DAIN, Cat 5, Top 7, Msg 25) [EOA] [WHF] WEE HOURS RUN FOR FOOD """""""""""""""""""""" It was fun last year going in mass to Denny's during the wee hours (or whatever restaurant it was). It seemed like we drove around those vast parking lots forever to finally find the way leading to the diner. Note to self: by all that is holy, never order their garlic cheese bread. That crunchy, lifeless pile of stale sawdust was an abomination. Andy (AWMOLLOY, Cat 5, Top 7, Msg 26) >>>>> """"" Ack. :) Eric "Sheppy" Shepherd sheppy@syndicomm.com Owner, Syndicomm http://www.syndicomm.com Building communities, bit by bit. (SYNDICOMM, Cat 5, Top 7, Msg 27) [EOA] [TBH] KansasFest 2005 to be Held JULY 19-24th """"""""""""""""""""""""""""""""""""""" Mark your calendar and start saving some money. [KFW] KansasFest Website """""""""""""""""" Is located here: http://www.kfest.org [EOA] [INN]------------------------------ EXTRA INNINGS | ----------------------------------- About The Lamp! The Lamp! is published on the fifteenth of every month on """"""""""""""" the WEB at: http://lamp.a2central.com/ This publication produced entirely with real or emulated Apple II computers using Appleworks 5.1 and Hermes. Apple II Forever! * The Lamp! is (c) copyright 2005 by Ryan M. Suenaga, M.S.W. All rights reserved. * To reach The Lamp! on Internet email send mail to thelamp@sheppyware.net * All issues of The Lamp! are available at The Lamp! Home Page, http://lamp.a2central.com/ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Opinions expressed herein are those of the individual authors, and do not necessarily represent the opinions of A2Central.com, Delphi Online Services, Syndicomm, Ryan M. Suenaga, or Lyle Syverson. Forum messages are reprinted verbatim and are included in this publication with permission from the individual authors. A2Central.com, Delphi Online Services, Syndicomm, Ryan M. Suenaga, and Lyle Syverson do not guarantee the accuracy or suitability of any information included herein. We reserve the right to edit all letters and copy. Material published in this edition may not be reprinted without the expressed written consent of the publisher. Registered computer user groups, not for profit publications , and other interested parties may write the publisher to apply for permission to reprint any or all material. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< [EOF]