home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1996 #3 / AmigaPlus_CD-ROM-EXTRA_Nr.3.bin / aminet-spiele / denk&grübel / defektris / defektris.doc < prev    next >
Text File  |  1992-09-02  |  21KB  |  525 lines

  1.  
  2.  
  3.        D E F E K T R I S   9 4   D O C U M E N T A T I O N
  4.        ===================================================
  5.  
  6.  CONTENTS (by line number)
  7.  --------
  8.  
  9. 1 - Contacting the author (plus a little introduction).......36
  10.  
  11.   1.1 - Getting the Source Code..............................67
  12.  
  13. 2 - Installing and Running Defektris.........................77
  14.  
  15. 3 - The Main Control Screen..................................130
  16.  
  17. 4 - Playing the Game.........................................155
  18.  
  19.   4.1 - Aim and Controls.................159
  20.  
  21.   4.2 - Bonuses and Scoring..............246
  22.  
  23. 5 - Viewing and saving high scores...........................304
  24.  
  25. 6 - Creating Custom Levels...................................325
  26.  
  27.   6.1 - The Main Editor Screen...........341
  28.  
  29.   6.2 - The Edit Level Screen............412
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  1 - CONTACTING THE AUTHOR
  37.  -------------------------
  38.  
  39. Defektris was programmed in assembler by Sam Baker, with music by Keith
  40. Baker and graphics by Sam Baker and Mike Duggan. It began in June 1993
  41. when my Noughts and Crosses game failed and I decided to write something
  42. with less artificial intelligence in it - another falling blocks game.
  43. As the game progressed though it turned into more than just another version
  44. of a certain Russian puzzle game - it became a Russian puzzle game with
  45. bonuses and a level editor!
  46.  
  47. Anyway, please contact me if you find any bugs or want to employ me as a
  48. programmer! I'm just a poor Computer Science student y'see.
  49.  
  50. Please send any mail to:
  51.  
  52.  SamSoft,
  53.  100 Beauley Rd.,
  54.  Southville,
  55.  Bristol,
  56.  BS3 1QG.
  57.  
  58. or e-mail me at university:
  59.  
  60.  csysb@scs.leeds.ac.uk
  61.  
  62. E-mail replies guaranteed, snail-mail not!
  63.  
  64. Defektris 94 is dedicated to my cats.
  65.  
  66.  
  67.    1.1 - Getting the Source Code
  68.    -----------------------------
  69.  
  70.  
  71. The source code for Defektris 94 is available from SamSoft and includes the raw graphics files and samples. It comes on
  72. two disks which are included in the price of £10 (pound sterling). Just send me £10 in a form that I can easily get
  73. deposited into my bank account along with your address. In return I will send the source code in a jiffy bag.
  74.  
  75.  
  76.  
  77.  2 - INSTALLING AND RUNNING DEFEKTRIS
  78.  ------------------------------------
  79.  
  80. Defektris must be distributed with the following files:
  81.  
  82.   Defektris                       (The program itself)
  83.   Defektris.info                  (The program icon)
  84.   DefektrisEditor.data            (The level editor graphics)
  85. and
  86.   Defektris.doc                   (This documentation file)
  87.  
  88. Other optional files include:
  89.  
  90.   DefektrisHiScores               (The highscore table)
  91.  
  92. and also any files ending in the .dlv suffix meaning level data saved
  93. by the Defektris level editor.
  94.  
  95. The DefektrisEditor.data file must be in the Defektris: volume. This can
  96. be done by putting the file in the root directory of a disk or volume called
  97. Defektris or by adding the following line to your startup-sequence:
  98.  
  99.   assign Defektris: <dirname>
  100.  
  101. where <dirname> is the name of the directory where the data file is located.
  102. This is also the directory where high scores will be saved.
  103.  
  104. To load and save Defektris level editor files the libs: directory must
  105. contain either asl.library (Kickstart 2 and above), or reqtools.library
  106. for any Amiga.
  107.  
  108. Reqtools.library is copyright Nico François, used with his kind permission.
  109.  
  110. Defektris can be run from an AmigaDos Shell or CLI or from Workbench by
  111. double-clicking on its icon. When run Defektris will attempt to load the
  112. DefektrisEditor.data and DefektrisHiScores files from the Defektris:
  113. directory.
  114.  
  115. When Defektris is loaded a file requester will appear. This can be used to
  116. load a Defektris custom level file (see below) ending in the suffix, .dlv.
  117. To carry on select a file and click on load/OK or just click on play without
  118. loading any levels.
  119.  
  120. NOTE: If Defektris cannot find the DefektrisEditor.data file or if there is
  121. not enough memory available to load it and allocate other level editor
  122. memory then Defektris will still run but the file requesters will not appear
  123. and the Edit Levels and Custom buttons on the Defektris Control Screen will
  124. not operate (shown by a criss-cross pattern on the buttons).
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  3 - THE MAIN CONTROL SCREEN
  131.  ---------------------------
  132.  
  133. As soon as Defektris is loaded the intro will appear with some text for
  134. you to read if you're bored. The right mouse button can be used to move on
  135. to the next screen of text, otherwise it will change after a timeout.
  136.  
  137. Pressing the left mouse button, fire or any key will end the intro taking
  138. you to the Defektris control screen. From here you can play three different
  139. game types, edit levels and view the high scores. All the options are
  140. represented by pretty buttons you can click on! Throughout such screens
  141. the joystick and mouse can be used to move the pointer and select options.
  142. The mouse is usually easiest, especially in the level editor. The keys
  143. are used in some parts for various things - in the control screen every
  144. button has a keyboard shortcut (underlined), that has the same effect as
  145. clicking on it.
  146.  
  147. The title sequence can be viewed by clicking on its button. There are also
  148. instructions available by clicking on the (surprise surprise) Instructions
  149. button. The other options are documented in later sections.
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  4 - PLAYING THE GAME
  156.  --------------------
  157.  
  158.  
  159.    4.1 - Aim and Controls
  160.    ----------------------
  161.  
  162.  
  163. To begin a game click on the play button from the Control Screen. This will
  164. begin one of three types of game (selected on the Control Screen). In all
  165. of the games the aim is to navigate the falling blocks into positions that
  166. make full horizontal lines of blocks at the bottom of the screen. When this
  167. happens that line will disappear and another block will fall. The game ends
  168. when there is no room for any more blocks to fall or the Escape key is
  169. pressed.
  170.  
  171. In some levels there is a distinct pattern in the background over which the
  172. blocks will fall. If the blocks cover this pattern a bonus is awarded and
  173. a nice noise hurtles out of your speakers! The points you are given depend
  174. on how efficiently you cover the pattern. i.e. if the pattern is made up
  175. of six squares and you cover it with exactly six squares of block then you
  176. get the maximum number of points. NOTE: To make some of the levels more
  177. challenging covering the bonus at the same time as filling a horizontal line
  178. does not give you the points. Also the bonus can only be scored once on each
  179. level.
  180.  
  181. Some of the blocks that fall have special properties. These properties are
  182. ONLY activated when the special block is used to make a line. If a block
  183. falls with a bomb next to it then completing a line with that block will
  184. trigger a series of explosions filling (if there are any) holes in the
  185. pile of blocks already on the screen. A block may also have a letter next
  186. to it from the word BONUS. If so, making a line will add that letter to
  187. the Bonus display to the right of the screen. When all letters are lit
  188. a little face will tell you and points (3349 of them) will be added to your
  189. score.
  190.  
  191. It is possible to fill a maximum of four horizontal lines without using the
  192. bomb. Manage the maximum four (or more with the bomb) and you will be
  193. congratulated for your 'TOP MOVE'. The score you get rises exponentially
  194. with the number of lines you get at once - in other words getting four lines
  195. at once scores more than getting four lines seperately. See the Scoring
  196. section below for details.
  197.  
  198. The three game types available are:
  199.  
  200.     i) Levels
  201.  
  202.  This is the default selection. In this mode clicking on Play lets you
  203.  play 80 default levels. In this mode the Lines counter display on the left
  204.  of the screen shows how many more lines must be completed to progress to
  205.  the next level. Each level may or may not have a bonus pattern to cover.
  206.  If it does there will be holes in the blocks so the pattern can be seen
  207.  through them.
  208.  
  209.     ii) Custom
  210.  
  211.  This game type is the same as Levels above except that the 80 default
  212.  levels are replaced by either the levels that were loaded on startup, or
  213.  if none were loaded, a single default level.
  214.  
  215.     iii) Arcade
  216.  
  217.  In this mode there is only one level and instead of a series of
  218.  increasingly difficult levels, the single level gets faster the more lines
  219.  you complete. In this case the Lines counter display shows how many lines
  220.  have been completed during the current game.
  221.  
  222.  
  223. The blocks can be controlled using the joystick or keys as shown below:
  224.  
  225.  JOYSTICK:
  226.  
  227.     Left                            - Move block left.
  228.     Right                           - Move block right.
  229.     Down                            - Drop block quickly.
  230.     Fire                            - Rotate block by 90 degrees.
  231.  
  232.  KEYS:
  233.  
  234.     Left Arrow Z or X               - Move block left.
  235.     Right Arrow . or /              - Move block right.
  236.     Down Arrow or Space             - Drop block quickly.
  237.     Up Arrow Shift Alt or Amiga     - Rotate block by 90 degrees.
  238.  
  239. Other functional keys are:
  240.  
  241.     P                               - Pause.
  242.     M                               - Toggle Music/FX
  243.     ESCAPE                          - Quit.
  244.  
  245.  
  246.    4.2 - Bonuses and Scoring
  247.    -------------------------
  248.  
  249.  
  250. When creating lines the most points are scored by:
  251.  
  252.    a) making more lines at once
  253.    b) making the lines higher up the screen
  254.    c) dropping the blocks faster
  255.  
  256. When covering the bonus pattern the most points are scored by covering
  257. all the bonus squares but as few of the other squares as possible.
  258.  
  259.  SCORING FORMULAE:
  260.  
  261. The score for completing lines is calculated as follows:
  262.  
  263.  The BASIC score for each line made in one move is
  264.  
  265.          LINENUMBER * 26 + 163
  266.  
  267.  where LINENUMBER goes from one to the number of lines got together as
  268.  each is evaluated. The following table shows the resultant scores:
  269.  
  270.     Lines    Line Score    Total Move Score
  271.  
  272.     1:      163         163
  273.     2:      189         352
  274.     3:      215         567
  275.     4:      241         808
  276.     5:      267         1075
  277.     6:      293         1368
  278.     7:      319         1687
  279.     8:      345         2032
  280.     etc...
  281.  
  282.  The score is THEN multiplied by 20 and then divided by SPEEDDIV where:
  283.  
  284.          SPEEDDIV = (Number of slow moves)*2 + (Number of fast moves)
  285.  
  286.  and the moves referred to are the 8 line falling movements.
  287.  
  288.  
  289.  
  290. The score for covering the bonus is calculated as:
  291.  
  292.          BONUS = 2*(Nth triangle number)
  293.  
  294. where N is the number of UNcovered squares.
  295.  
  296.  
  297.  
  298. The score for getting all the bonus letters is fixed at 3349.
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  5 - VIEWING AND SAVING HIGH SCORES
  305.  ----------------------------------
  306.  
  307. When you get a high score you get to enter your name. In the enter-your-
  308. name screen type your name with the keys or click on the buttons using the
  309. pointer. Clicking on the CLEAR button or pressing escape will clear the
  310. name and clicking on DONE or pressing return will exit.
  311.  
  312. The High Scores can be viewed by clicking the obvious button from the
  313. Defektris Control Screen. The scores are loaded automatically if a file
  314. called DefektrisHiScores is found in the Defektris: directory. The
  315. Quit Options set of buttons on the Control Screen determines what happens
  316. to the high scores WHEN QUIT IS SELECTED - no file output occurs until the
  317. program exits. Abandon will leave the DefektrisHiScores file unmodified,
  318. Save will replace it with the current high scores, and Delete will remove
  319. the file if it exists.
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  6 - CREATING CUSTOM LEVELS
  326.  --------------------------
  327.  
  328. Here comes the fun part - designing new levels to be used in Defektris!
  329. Level data is stored in files ending with .dlv that can store 15 levels.
  330. The levels are loaded via an ASL or reqtools file requester that appears
  331. on startup and edited from within Defektris. Modifications can be saved
  332. on exit via another file requester. NOTE: Changes can only be saved to
  333. disk when Defektris exits. Clicking save in the editor only saves the
  334. changes in memory. To save to disk you must also select Quit and then
  335. save the levels with the file requester.
  336.  
  337. The levels you create or load can be played by selecting the Custom Game
  338. Type from the Defektris Control Screen and then clicking on play.
  339.  
  340.  
  341.    6.1 - The Main Editor Screen
  342.    ----------------------------
  343.  
  344.  
  345. The level editor is entered by clicking on Edit Levels from the Defektris
  346. Control Screen.
  347.  
  348. NOTE: It is much easier to use the mouse as a control method rather than the
  349. joystick when editing levels.
  350.  
  351. The screen displayed first shows all the 15 levels as a grid of icons
  352. (pictorial representations). Each icon has a level number and a 32 by 16
  353. pattern. This is the background pattern used in the level enlarged, to
  354. remind the user which levels correspond to each icon.
  355.  
  356. Each icon can be selected by clicking on it with the mouse or joystick
  357. pointer, but only one can be selected at one time. The arrow keys can also
  358. be used to select different levels. From here the levels can be edited
  359. individually, sorted into order and deleted.
  360.  
  361. At the bottom of the screen is a panel of options. These are described from
  362. left to right and all but APPEND operate on the currently selected level
  363. (shown by a red box round the level number) :
  364.  
  365.     a) EDIT - This takes you into the Edit Level Screen, allowing you to
  366.        modify the current selected level - see Section 6.2 below. If the
  367.        selected icon is an Empty Level this option will not work - use
  368.        DEFAULT or INSERT to fill the space with a default level to edit.
  369.  
  370.     b) INSERT - This inserts a Default level at the current position if
  371.        there is an empty level anywhere after the currently selected one.
  372.        This may shift levels forward to create a space in the current
  373.        position.
  374.  
  375.     c) DEFAULT - This replaces the currently selected level with a default
  376.        level - WARNING: This operation will delete the current level from
  377.        memory forever!
  378.  
  379.     d) APPEND - This option finds the first empty level (if there is one),
  380.        replaces it with a default level and selects it ready for editing.
  381.        This is usually the most convenient way to add a new level.
  382.  
  383.     e) SWAP - This option is used to swap one level with another. To swap
  384.        a pair of levels around select one of them, click on SWAP then click
  385.        on the level you want to swap it with. Clicking on SWAP changes the
  386.        mouse pointer to a SWAP pointer until the mouse (or fire) is clicked
  387.        again.
  388.  
  389.     f) COPY - This operation will copy a level over another one. To copy an
  390.        icon select it and then click on copy. The mouse pointer then changes
  391.        to a COPY pointer and the next icon you click on will be replaced by
  392.        the currently selected icon - WARNING: This operation will delete
  393.        the level you copy over from memory forever!
  394.  
  395.     g) DELETE - Clicking on DELETE will delete the currently selected level
  396.        from the list. THIS DATA CAN NOT BE RETRIEVED!
  397.  
  398.     h) SAVE & EXIT - This will return you to the Defektris Control Screen
  399.        saving all modifications BUT ONLY TO MEMORY. To save to disk Quit
  400.        must be selected and the file requester used to save the data.
  401.  
  402.     i) ABANDON & EXIT - This also returns you to the Defektris Control
  403.        Screen but changes made to the levels will not be remembered. This
  404.        means all changes (in the current edit only) will be lost forever.
  405.  
  406. With these options the levels can be sorted into order changed in any way
  407. without altering the previous edit unless SAVE & EXIT is selected. If SAVE
  408. & EXIT IS selected then the changes are kept in memory and can be saved to
  409. disk when Quit is selected and the file requester appears.
  410.  
  411.  
  412.    6.2 - The Edit Level Screen
  413.    ---------------------------
  414.  
  415.  
  416. Clicking on EDIT from the Main Editor Screen will take you to the Edit Level
  417. Screen. Here the currently selected level is displayed as it appears in the
  418. game. but with a control panel added at the bottom of the screen. This is
  419. used to make modifications to the level.
  420.  
  421. The attributes of a level that can be changed are listed below with
  422. details of how to change them:
  423.  
  424.  o Number of lines required to complete the level.
  425.  
  426.    This is changed by editing the three digit number to the left of the
  427.    panel with LINES: written above it. This affects the difficulty of the
  428.    level.
  429.  
  430.  o Speed of falling blocks.
  431.  
  432.    This is changed by editing the two digit number to the left of the panel
  433.    with SPEED: written above it. The speed can vary between 1 (slow) and
  434.    35 (fast).
  435.  
  436.  o The Background Pattern.
  437.  
  438.    The 32 by 16 pixel pattern displayed in the background is enlarged in a
  439.    box in the control panel. Here it can be edited using the pointer and
  440.    fire or the left mouse button. Clicking on a square in the grid CHANGES
  441.    the colour and all drawing done without releasing the button uses this
  442.    initial colour, opposite to the colour clicked on initially. This allows
  443.    deleting and drawing to be done with the same controls. While the pointer
  444.    is WITHIN the pattern grid, pressing escape will clear the pattern. This
  445.    saves deleting it manually. Changes can be seen in the main game screen
  446.    immediately as they would look in the game.
  447.  
  448.  o The Bonus Pattern.
  449.  
  450.    The background bonus pattern gives the player points when covered. To
  451.    enable a bonus pattern in the current level make sure the Shape Bonus
  452.    button is marked ON. ON/OFF can be toggled by clicking the button. To
  453.    enable editing of the bonus pattern the EDIT button must be toggled so
  454.    that the text beside it reads BONUS. In this mode when the mouse pointer
  455.    moves onto the game screen it turns into a bonus pattern square. It can
  456.    then be used to draw a bonus pattern onto the box where the shapes fall.
  457.    To view all of the box click on the down arrow near the middle of the
  458.    panel until the game screen scrolls the box into view. When EDIT BONUS
  459.    is selected and the pointer is over the box in the game screen, pressing
  460.    escape will clear the Bonus pattern.
  461.  
  462.  o The Block Pattern.
  463.  
  464.    A pattern of blocks can be drawn that will appear at the start of the
  465.    level. This generally makes the level harder with less space for
  466.    wiggling the blocks around. To edit this pattern click on EDIT until
  467.    EDIT PATTERN is displayed. Then moving the pointer off the panel turns
  468.    it into a block that can be drawn onto the box in the game screen.
  469.    Again patterns drawn here can be deleted by pressing escape while the
  470.    pointer is over the box.
  471.  
  472.  o The Colour Palette.
  473.  
  474.    Under the Control group of buttons on the right of the panel is an
  475.    Edit Palette button. Clicking on this replaces the panel with a colour
  476.    editing panel described below. Clicking on DONE in the Palette Editor
  477.    returns you to the main editor panel.
  478.  
  479. Other buttons are:
  480.  
  481.  RESTORE - this restores the edited level to its state before any editing
  482.  took place losing the current changes permanently.
  483.  
  484.  VIEW ALL - this button removes the editpanel from view so the whole screen
  485.  can be seen. Pressing a key, fire or the left mouse button brings the panel
  486.  back.
  487.  
  488.  DONE - this returns you to the Main Editor Screen saving the current
  489.  changes IN MEMORY.
  490.  
  491. Once you return to the Main Editor Screen the changes you just made can
  492. only be restored by clicking on ABANDON & EXIT in the Main Editor Screen,
  493. but this also restores all levels changed during the current edit - so
  494. make sure you want to keep the changes before clicking done in the Edit
  495. Level Screen. One good way of testing modifications is to copy the level
  496. into an empty space if available and then change one of the copies.
  497.  
  498.  The Palette Editor:
  499.  
  500. In the Palette Editor there are 16 colours that can be edited using a set
  501. of three sliders. There is a horizontal slider for Red, one for Green and
  502. one for Blue. Using these each colour is selected from a palette of 4096.
  503. The sliders can be moved by clicking on a position from 0 to 15 across their
  504. length or by clicking on them, holding the mouse/fire button down and
  505. dragging the slider around to the desired value. The onscreen colour will
  506. change as the slider is moved around. The values (0 to 15) of the Red(R),
  507. Green(G) and Blue(B) sliders are shown to the right of the panel as they
  508. change.
  509.  
  510. The sliders always act on one colour at a time. This colour is highlighted
  511. in the colour panel below the sliders. To select a different colour either
  512. click on the colour in the panel or click on it anywhere in the game screen
  513. area. A description of the currently selected colour is displayed at the
  514. bottom of the panel.
  515.  
  516. Different areas of the screen can be viewed by clicking on the up and down
  517. arrow buttons - these scroll the game screen up and down.
  518.  
  519. All changes made to the palette in the current use of the Palette Editor
  520. can be restored by clicking on the RESTORE button.
  521.  
  522. When the palette edit is finished pressing DONE returns to the Edit Level
  523. Control Panel.
  524.  
  525.