SnakePit by Michael Sinz Copyright (c) 1988 - MKSoft Development SnakePit is a simple and yet addictive game in which you must get the snake (you) off of the screen. There are, however, some rough spots and some obstacles that may need to be overcome. This game was written as an example of how to do a game that is as system friendly as possible. During development, there was joystick control of the snake and I was able to have my little brother play it in the top-half of a 400-line screen while I was working on code in the bottom half. Since this is a quick (1-week) hack that was done back in 1988 and since it was written in pre-ANSI Manx days, the code looks a bit ugly. I hope you can understand. If you come up with some good screens for SnakePit, please send them to me. ************************************************************************ Reading legal mush can turn your brain into guacamole! So here is some of that legal mush: Permission is hereby granted to distribute this program's source, executable, and documentation for non-commercial purposes, so long as the copyright notices are not removed from the sources, executable or documentation. This program may not be distributed for a profit without the express written consent of the author Michael Sinz. This program is not in the public domain. Fred Fish is expressly granted permission to distribute this program's source and executable as part of the "Fred Fish freely redistributable Amiga software library." Permission is expressly granted for this program and it's source to be distributed as part of the Amicus Amiga software disks, and the First Amiga User Group's Hot Mix disks. ************************************************************************ If you have any comments or suggestions (or bug reports :-(), you can contact MKSoft Development via BIX: "msinz" or USENET: "rutgers!cbmvax!mks" or INTERNET: "mks@cbmvax.commodore.com" or via USnail at the address below. If you enjoy this program, and would like to see more quality software for the Amiga, please help "feed the programmer" For only $20 you will get a disk with the latest and greatest of MKSoft Development. MKSoft Development 163 Appledore Drive Downingtown, PA 19335 ************************************************************************ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ User's Guide Overview: SnakePit is a simple action game in which your character (the snake) must be maneuvered out of the various screens. You must, however, realize that a snake can not backup nor can it bit itself. There are a few objects on the screen that can cause problems during your attempt to exit the screen. SnakePit can take data files which can contain new screens for an endless supply of screens. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Starting the program: SnakePit can be started from the CLI or the WorkBench. In either case, you may start the program with or without a data file. From the WorkBench: If the program is started directly from the WorkBench, all of the screens, keyboard definitions, and high scores will come from within the executable file. Any screens that are modified, keyboard mappings that are changed, or new high scores will be saved back into the executable for the next time. If the program is started from a project icon (there is one provided) it will use the screens, keyboard mapping, and high scores from that file. If that file does not exist, it will create it from the built-in copy of that data. All changes to the screens, keyboard, or high scores will be saved in this data file. From the CLI: If SnakePit is started without parameters, all of the screens, keyboard definitions, and high scores will come from within the executable file. Any screens that are modified, keyboard mappings that are changed, or new high scores will be saved back into the executable for the next time. This will NOT happen if SnakePit program can not find its executable. If the program is started with a filename parameter, it will use the screens, keyboard mapping, and high scores from that file. If that file does not exist, it will create it from the built-in copy of that data. All changes to the screens, keyboard, or high scores will be saved in this data file. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Main Screen: At the main screen, also known as the title screen, there are a few menu options. Project Menu: - This menu contains the following options: PLAY (AMIGA-P) This starts the game. At which point a requester is brought up to let you select the starting level. DEFINE KEYS (AMIGA-K) This brings up the keyboard definition requester. EDIT (AMIGA-E) This puts SnakePit into the LEVEL EDIT mode, at which point the level select requester will ask which level you wish to edit. DRUMS ON/OFF This lets you turn off the drum sounds. SOUND ON/OF This lets you turn off ALL sounds. QUIT (AMIGA-Q) Exit SnakePit and save any changes to the screens, keyboard, or high scores. HIGH SCORES This is for information only. When you are on this item, the high scores are display to the right. If you highlight a score that is displayed at the right and release the menu button, the full high scores requester will come up for display only. Speed Menu: This menu contains items 1 to 9 with AMIGA-key 1 to 9 to select from the keyboard. This selects the starting speed of the Snake. Edit Menu: This menu is disabled except when in edit mode. It will be described in the edit part of this manual. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Game Play After selecting the PLAY menu item from the main screen, you will be asked to select the starting level. The level is the screen number at which you wish to start. There are 50 screens in a SnakePit "game." You may select the screen by typing the number of the screen (with a leading zero for screens 1 to 9) and pressing RETURN or ENTER. You may use the LEFT or RIGHT arrows to make the number go UP or DOWN. And you may use the mouse and click on the left and right arrows. After having selected your starting level, the screen will blank and the game will start. Starting a level: The level will fade onto the screen and your snake will be in the edge of the screen somewhere. It will not move until you press one of the directional keys on the keyboard. (As defined in the DEFINE KEYS requester. The default to the ARROW keys.) Object of the game: The object is to get the snake off of the screen. This may sound easier than it is. One many screens, the way out is blocked by what looks like a solid brick wall. In these cases, all you have to do is eat all of the "grow" food pellets and suddenly one or more bricks will vanish. The "grow" food pellets (the light coloured round objects) have one major side effect. Each one makes your snake one segment larger. When you exit the screen, you get points based on how long your snake is. The longer the snake, the more points. But, with a longer snake you are more likely going to get yourself into a position where you can not move or where you bite yourself. Both of these mean death. In order to help, some screens will also have darker food pellets that will make you shrink by one segment. While this will reduce your final score, there are times when you must make your snake smaller in order to finish a part of the level. One warning, though: If your snake still is very small, you could shrink out of existence. For each "shrink" pellet you eat, you must have eaten one "grow" pellet. Also on some screens are some lighter coloured bricks. These "pink" bricks are not fixed in place and can be moved by the snake. However, the snake is not strong enough to move one of those bricks if there is anything on the other side, including another movable brick. Another obstacles is the POP-UP brick. These bricks are level with the ground and are not visible until the snake goes over them. After the snake has traveled over the brick, it pops up and is like any other brick. This can may for one-time paths and are used in many of the more complex screens. POP-UP bricks are also the entrance to the level. After each level, you receive another life and the next level is presented. If you finish level 50, you are restarted at level 1. As long as you are playing, however, the speed of the snake slowly gets faster and the second time around (if you can make it the first time...) will be more difficult. If at any moment, the snake is stopped and you do not select a new direction for the snake to go, the snake will pick, at random, a new direction. Pausing the game: During game play, pressing ESC or the MENU button will pause the game and display a requester. Pressing RETURN or ENTER will restart the game. ABORT will kill the current life and QUIT will quit the current GAME. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ High Scores If your score well enough to have your name on the high score board, the score board will be displayed with a cursor in the line where you are to enter your name. You may type in your name or use the character gadgets to enter your name. When done entering your name, just press RETURN or ENTER or click on the DONE gadget. When you want the requester to go away press the ESC key. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Defining the keys After having selected the DEFINE KEYS option from the PROJECT menu, a requester will come up to let you define the keys. The requester will have the four arrows on it and a box by the arrows telling what key that is. Since this requester lets you define the keys, you will need to use the mouse to select which one you wish to define. Just click on the direction you wish to define. The box will the display ??. Now, press the key you wish to define as that direction. The box will now show the code for that key. (If it can find one.) When you are happy with the selection, click on the continue gadget. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Edit Level After selecting EDIT from the PROJECT menu, you will be asked to select the level. This is the same requester as in the game play part of the program. Editing a level: The level selected will be drawn onto the screen and your mouse pointer will become a BOX. At this point the EDIT menu will become active. The EDIT menu contains the LEVEL (save,load,clear) commands, the EDIT tools, and the END EDIT command. The LEVEL menu item has three sub-items: Load, Save, and Clear. The LOAD item will load a level into the editor. The levels are all stored in memory and thus this will be fast. The SAVE item will save the current edit level into the level selected. The CLEAR item will clear the edit level to a "default" empty level. The edit tools are the different drawing items. They are: BRICK - This is the standard brick. PINCK BRICK - This is the pushable brick. DROP BRICK - This is the DROP brick that will vanish after the last "grow" pellet is eaten. POP-UP BRICK - This is the brick that will appear after the snake has travelled over it. GROW PELLET - This is the GROW food pellet. There should be atleast one on the screen. SHRINK PELLET - This is the SHRINK food pellet. ERASE - To draw blank areas. You draw the item much like in a paint program. You can erase an item by just drawing it again or using the ERASE tool. Levels are saved and loaded from the in-memory storage. If you make any changes to the levels, they are stored on disk when the program exits. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Level Design Rules and Hints #1 When designing a level you *MUST* have one POP-UP brick along the edge of the level. This is the place where the snake will start the level at. It is important that it be in place. #2 If you have a level in which the exit is a DROP brick, you *MUST* have atleast one GROW pellet. The DROP bricks drop when the last GROW pellet is eaten by the snake. #3 It is rather easy to make a level impossible. Make sure that you play-test the levels as much as possible. If you can not finish it, maybe it needs to be changed. #4 Try to make the levels interesting, with little puzzles that need to be solved. Things like PUSH bricks are very useful in these cases. Also, areas that the snake can go into and solve only if it is small enough. Take a look at some of the levels that come with SnakePit. #5 Remember that if you change a level that it is saved only when you quit the program. #6 Remember that if you run SnakePit from the PROJECT icon or via the CLI without a data file, all changes will happen in the executable. You could end up losing the screens that come with the program. #7 Share your new levels with your friends. Just give them your data file and they will be able to use the new levels. #8 If you come up with some levels that you think are good, please send the data files to me. I hope to be able to put together a set of data files for those who get hooked. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Files and Sizes in this distribution If the file sizes do not match you do not have the original version. In that case, please contact MKSoft Development and the source of the files such that the problem can be corrected. ContinueImageData.h 6094 ----rwed Data.info 1585 ----rwed HighScoresImageData.h 97962 ----rwed MakeFile 3248 ----rwed PauseImageData.h 18118 ----rwed Pit_Stuff.ASM 1067 ----rwed ReadMe 15045 ----rwed Screen.ASM 108641 ----rwed SelectKeysImageData.h 52292 ----rwed SelectLevelImageData.h 24457 ----rwed Snake.c 3571 ----rwed Snake.h 2701 ----rwed SnakePit 254900 ----rwed SnakePit.info 1177 ----rwed Snake_Edit.c 5274 ----rwed Snake_Main.c 2772 ----rwed Snake_Parts.h 9183 ----rwed Snake_Play.c 11884 ----rwed Snake_Save.c 3192 ----rwed Snake_Save.h 173 ----rwed Snake_Sound.c 5029 ----rwed Snake_Splash.asm 128026 ----rwed Snake_Stuff.c 3055 ----rwed Snake_Windows.c 29473 ----rwed Sounds.ASM 296198 ----rwed 25 files - 2178 blocks - 1084028 bytes