Warbots (c) 1990 by Chris Busch All Rights Reserved Welcome to Warbots! The scientists gathered in the top secret briefing room. All was quiet except for the speaker. The words rolled slowly out of his mouth: "Iraq has started to use massive chemical warfare on our American troops! They're dying by the thousands, but we've been able to keep that a secret from the American public. What we need to defeat the Iraqis is a war robot. Something that can be brought in to save countless lives. We at the Pentagon have chosen you, the top military robotic engineers, to built this war machine. This mission is to be known as OPERATION WARBOTS and it will be absolutely TOP SECRET!" The scientists swiftly run to their labs to conduct testing. This game was created for people to learn the basics of programming while having fun and excitement. With this program you can build a mighty "Warbot" and program it with many instructions. The Warbots Concise Command Reference Chart Command: Type: (Very) Brief Description: ------------------------------------------------------------------------- Add "variable" n procedure adds n to "variable" Ahead function Returns: Barrier {87}, Cream {67}, Nothing {32}, or Warbot {87} AheadLeft function see "Ahead" AheadRight function see "Ahead" Alive function Returns number of alive warbots Backup procedure backs up the warbot Barrier constant same as 87 used with "Ahead" & the like BarrierCount function returns # of barriers surrounding it Beep procedure sounds an alarm Behind function see "Ahead" BehindLeft function see "Ahead" BehindRight function see "Ahead" Clear procedure Clears out all of the Warbot's variables Cream constant same as 67, used with "Ahead" & the like CreamCount function returns # of cream piles surrounding it CreamSupply function returns the warbot's remaining cream Done procedure same as Goto 1 East constant same as 2, used with GetAim & SetAim EndIf reserved Used to end an If control structure Fire procedure fires a rocket GetAim function returns current aim (direction facing) GetBuffer function returns number in radio buffer and zeros it GetKey function Returns key in keyboard buffer, a negative number is special key i.e. cursor keys GetX function returns x position (1 to 14) GetY function returns y position (1 to 12) Goto n procedure goes to memory line n Gosub n procedure jumps to memory line n, see Return If...EndIf conditional see Additional Notes #1 below Left function see "Ahead" Move procedure moves the warbot forward North constant same as 0, used with SetAim & GetAim NorthEast constant same as 1, used with SetAim & GetAim NorthWest constant same as 7, used with SetAim & GetAim Nothing constant same as 32, used with Ahead & the like NothingCount function returns # of nothing surrounding it Print variable procedure Prints out variable for debugging Random function generates a number from 0 to 7 Repeat...until conditional see Additional Notes #2 below Return procedure Returns back to a gosub Right function see "Ahead" RocketSupply function returns number of remaining rockets Scan x y variable procedure Scans the x,y spot & puts value in the varible Send n "botname" procedure sends a number to a warbot's radio buffer SetAim n procedure sets the aim absolutely (0-7) South constant same as 4, used with SetAim & GetAim SouthEast constant same as 3, used with SetAim & GetAim SouthWest constant same as 5, used with SetAim & GetAim Spill procedure causes cream to be released Subtract "var" n procedure subtracts n from "var" Turn ñ n procedure turns the warbot relative to current aim Until comparision reserved Part of an repeat loop, see Additional Notes variables The letters "A" thru "Z" & "@", see Additional Notes #3 Wait procedure waits for the user to press a key Warbot constant same as 66, see Ahead & the like WarbotCount function returns # of warbots surrounding it West constant same as 6, used with SetAim & GetAim Additional Notes: 1. "If" statements use the following syntax: If a<>b {lines of code} endif If the expression is false the warbot's program will jump to the "endif". "A" or "b" can be either be a varible, function or a constant. "If" statements have the operands: not equal "<>", equal "=", greater than ">", and less than "<". A "then" is not necessary but cam be included for clarity. The "If" statement can be nested and indenting is optional. 2. "Repeat" statements are similar to "If" statements. Repeat {lines of code} until a<>b The same rules apply to "If" statements see above #1. 3. Warbots provides 26 normal variables to its programmers. These variables are "A" to "Z" single letter variables. An example of assigning a variable: "a = b". "@" is also a variable but it is used with GetBuffer and Send. All variables are integers and each warbot has its own set of varibles. 4. Warbots uses eight directions from 0 to 7 (North to NorthWest as constants) with zero being up (North). 5. GetBuffer and Send operate with a one integer radio buffer. This can be accessed as the variable @. 6. Warbots is not case dependent. 7. Warbots also has the use of command line parameters, type WARBOTS /? for help on those features. 8. Most of all, experiment and look at the sample bot files. About the author and the program: Chris Busch lives in Northfield, Minnesota with his family. He is 16 years old and has been programming for about five years. Chris attends Northfield High School and has many activities one of which is programming. This program was written in Turbo Pascal 5.5 (C) by Borland International, Chris's favorite programming language. Some help was received from his friend, Kevin Huber on the playtesting and some program routines of the game. The game consists of approximately 3000 lines of code so far. Source code may be released to a registered user of Warbots at the author's discretion. The source code may not be redistributed in any form. Disclaimer: (I'm sorry but I must have the nitty-gritty) In no event will the author be liable for any damages, including any lost profits, lost savings or other incidental or consequential loss or damages arising out of the use or of the inability to use this program -- even if the author has been advised of the possibility of such damages. The author will in no event be held liable for direct, indirect, or incidental damages resulting from the omission of any part of this product, including this document. The author makes no warranties, either expressed or implied, respecting the software, its quality, performance, merchantability, or fitness for any particular purpose. Author's Bill of Rights: Warbots is copyrighted, but may be distributed far and wide if the following rules are followed: 1. No fees are to be collected from the distribution of the trial program version even for shipping and handling or otherwise unless written permission is granted. 2. The program and associated files may not be distributed in a modified form (except for the robot .WAR files which are public domain). Warbots is being distributed with the shareware concept in mind. Where you the user may use this version of the program on a "trial" basis and if you find it enjoyable you should register it, and receive the newest update of Warbots. If you register Warbots for the low amount of $10 then you'll receive password and source code to some very neat bots. All you have do is include $2 for shipping & handling costs. Also, with your registration, you'll gain access to the "The Warbots Help Hot Line" (my home phone number) where you the user can get in touch with the author himself (me)! You will also be in line for new versions of Warbots when they are released. All this for such a low price! Please send registrations & questions to: Chris Busch 32820 Embry Ave Northfield, MN 55057 Many Thanks