home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 5 / CD_Magazyn_EXEC_nr_5.iso / Programy / Programowanie / BASIC / BallMasterSrc.lha / BallMasterSrc / development.txt < prev    next >
Encoding:
Text File  |  2000-12-29  |  5.6 KB  |  165 lines

  1.  
  2. Short developer documentation for BallMaster
  3. ============================================
  4.  
  5. Copyright (C) 2000  Damir Arh
  6.  
  7.  
  8. Distribution
  9. ------------
  10.  
  11. This program is free software; you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation; either version 2 of the License, or
  14. (at your option) any later version.
  15.  
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. GNU General Public License for more details.
  20.  
  21. You should have received a copy of the GNU General Public License
  22. along with this program; if not, write to the Free Software
  23. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24.  
  25.  
  26. Introduction
  27. ------------
  28.  
  29. I decided to release the source files for BallMaster under the terms
  30. of GNU General Public Licence because I don't have time to work on it
  31. any more. In this way I hope to give the possibility of modifying the
  32. game graphics, levels or the game itself to everyone who might be
  33. interested.
  34.  
  35. In the following lines I'll try to give a short description of the
  36. files found in this archive to make the first steps in modifying the
  37. game easier. I know that the source code might be a bit problematic
  38. as most of the comments and identifier names are in Slovenian language
  39. but you'll probably manage it anyway.
  40.  
  41. I don't intend to help in further development in any way but I am
  42. prepared to answer any questions about the source code you might send
  43. me (as long as they are in reasonable numbers). I'd also appretiate it
  44. if you contact me regarding the modifications you might have made so
  45. that we can prevent several different game versions popping up.
  46.  
  47.  
  48. File description
  49. ----------------
  50.  
  51. There are several files in the source archive (you also need the binary
  52. archive to have the complete set of game files):
  53.  
  54. BallMaster.asc is the main game source in Blitz 2 saved as ASCII file.
  55. To compile it you need to set the current directory to the one where the
  56. *.gfx and *.col files reside. By setting the constant #ecs to 0 or 1 you
  57. decide to compile the AGA or ECS version respectively (conditional
  58. compilation).
  59.  
  60. shapes.asc is the source file (also written in Blitz 2 and saved as ASCII
  61. file) for the program which generates the *.gfx files which get included
  62. in the final executable.
  63.  
  64. *.iff files are the graphics 'source' files. Use the shapes program to
  65. generate *.gfx files from them. *.col files are the palette files for
  66. these graphics. They also get included in the executable.
  67.  
  68.  
  69. Changing graphics
  70. -----------------
  71.  
  72. To change the in-game graphics you have to modify the included *.iff files.
  73. Make sure you keep the same number of colors if you don't want to modify
  74. the source, too.
  75.  
  76. To change the between-level graphics (they are only included in the binary
  77. archive), you should change the files in the gfx folder. Check the loading
  78. function at the beginning of the source code to see what gets checked in
  79. the picture header to see if the file is valid. You should confirm to this
  80. check or you can just remove the check from the source code (in this case
  81. you should really include a more proper check for file validity there).
  82. Make sure you don't use the last pen in the palette as it gets changed for
  83. internal use.
  84.  
  85.  
  86. Changing levels
  87. ---------------
  88.  
  89. The levels are described in two files, both in the lvl directory. The first
  90. file is default.dat and describes level meta data. The first line contains
  91. the complete number of levels, then every 8 lines describe one single level
  92. in the following way:
  93.  
  94. - level title
  95. - level time
  96. - time between ball releases
  97. - number of predefined colours to complete
  98. - time interval between combination appearances
  99. - time bonus for the combination
  100. - percent of joker balls
  101. - checksum
  102.  
  103. Details about the checksum can be found in the game source in the load_levels
  104. routine. Of course you can also disable the checksum checking in the source
  105. but in this case you should find another way for checking for the validity
  106. of the level file.
  107.  
  108. The second file is default.map and this one contains the actual map data in
  109. sequential order (ie. 70 bytes for each level - tiles from left to right from
  110. top to bottom). The byte values are as follows:
  111.  
  112. 00 - empty tile
  113. 01 - horizontal tube
  114. 02 - vertical tube
  115. 03 - revolver (counter-clockwise)
  116. 04 - revolver (clockwise)
  117. 05 - tube crossing
  118. 06 - up-right tube
  119. 07 - down-right tube
  120. 08 - down-left tube
  121. 09 - up-left tube
  122. 10 - arrow right
  123. 11 - arrow down
  124. 12 - arrow left
  125. 13 - arrow up
  126. 14 - red horizontal filter
  127. 15 - red vertical filter
  128. 16 - green horizontal filter
  129. 17 - gren vertical filter
  130. 18 - yellow horizontal filter
  131. 19 - yellow vertical filter
  132. 20 - blue horizontal filter
  133. 21 - blue vertical filter
  134. 22 - red horizontal colour
  135. 23 - red vertical colour
  136. 24 - green horizontal colour
  137. 25 - green vertical colour
  138. 26 - yellow horizontal colour
  139. 27 - yellow vertical colour
  140. 28 - blue horizontal colour
  141. 29 - blue vertical colour
  142. 30 - teleport
  143. 31 - auto revolver (counter-clockwise)
  144. 32 - auto revolver (clockwise)
  145.  
  146. I suggest you configure your favourite map builder to create maps. It will
  147. certainly be the easiest way. And make sure that the map is valid or the
  148. game could crash when playing it. You could also make the necessary checks
  149. in the game source to prevent this.
  150.  
  151.  
  152. Suggestions
  153. -----------
  154.  
  155. At the end I'd like to give you some suggestions as to what could be improved
  156. in the game:
  157.  
  158. - increased number of levels
  159. - support for different level sets
  160. - improved graphics
  161. - graphics card support
  162.  
  163. Have fun playing with source code. I hope you'll succeed in making it better or
  164. that you'll at least learn something from it.
  165.