Quantx

telefrag.man

Sep 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.79 KB | None | 0 0
  1. @@@@@@@ @@@@@@@@ @@@ @@@@@@@@ @@@@@@@@ @@@@@@@ @@@@@@ @@@@@@@
  2. @@! @@! @@! @@! @@! @@! @@@ @@! @@@ !@@
  3. @!! @!!!:! @!! @!!!:! @!!!:! @!@!!@! @!@!@!@! !@! @!@!@
  4. !!: !!: !!: !!: !!: !!: :!! !!: !!! :!! !!:
  5. : : :: ::: : ::.: : : :: ::: : : : : : : : :: :: :
  6.  
  7. How to play:
  8.  
  9. Controls:
  10. Left Arrow:
  11. Turn Left
  12. Right Arrow:
  13. Turn Right
  14. Up Arrow:
  15. Move Forward
  16. Down Arrow:
  17. Move Backwards
  18.  
  19. X Key:
  20. Strafe Left
  21. C Key:
  22. Strafe Right
  23.  
  24. Space Bar:
  25. Shoot Revolver
  26. Revolver has 6 shots before you must reload.
  27.  
  28. V Key:
  29. Manually Reload
  30.  
  31. Pickups:
  32. Health:
  33. Refils part of your health. If you run out of health you die
  34. and must respawn.
  35. Ammo:
  36. Refils a few bullets worth of ammo, you'll still have to reload
  37. however. Run out of these and you're a stitting duck.
  38. Armor:
  39. Refils part of your armor. Armor absorbs half of incoming damage.
  40.  
  41. Map building:
  42.  
  43. This section is for people who are interested in making their own Telefrag
  44. maps.
  45.  
  46. Getting started:
  47. First, you'll need to name your map. For this example, we'll call our
  48. map 'mymap' (without the quotes).
  49.  
  50. Start by building the following directory tree:
  51. mymap/
  52. mymap/walls/
  53. mymap/sprites/
  54.  
  55. NOTE: The root directory will determine the name of your map
  56.  
  57. Next create the following two files:
  58. mymap/mymap.data
  59. mymap/mymap.meta
  60.  
  61. NOTE: The file names must match the name of the root directory
  62.  
  63. The 'mymap.data' file stores the layout of your map
  64. The 'mymap.meta' file stores the location of items and spawnpoints
  65.  
  66. Now let's make a simple map by editing 'mymap.data':
  67. 1,1,1,1,1,1,1,1,1,1,1,1,1
  68. 1,0,0,0,1,0,0,0,1,0,0,0,1
  69. 1,0,2,0,1,0,2,0,1,0,2,0,2
  70. 2,0,2,0,0,0,2,0,0,0,2,0,2
  71. 2,2,2,2,2,2,2,2,2,2,2,2,2
  72.  
  73. This will create zig-zag style map layout.
  74. Each number indicates which texture will be used to draw that wall.
  75.  
  76. The top left tile is at location (0, 0)
  77.  
  78. The number 0 indicates that there is no wall here.
  79. The perimeter of your map MAY NOT contain the value 0. This
  80. prevents players from falling off the map.
  81.  
  82. All numbers in mymap.data must be positive integers or 0
  83. The numbers CAN be longer than one digit. The following is valid:
  84.  
  85. 10,134,512
  86. 132,0,516
  87. 243,123,6
  88.  
  89. Maps must be rectangular, each line must contain the same number
  90. of commas. The map file may only contain the following characters
  91. "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "," "\n" The map file may
  92. not contain spaces and my not have two consecutive commas.
  93.  
  94. "1,1,1,1,1" VALID
  95. "1,1,,11,1" INVALID: ",," Is not valid
  96.  
  97. Now for every number used within mymap.data a corresponding wall
  98. texture must be created:
  99. Since we used the numbers 1 and 2 (0 empty space, not a wall)
  100. we will create the follwing two files
  101.  
  102. mymap/walls/1.data
  103. mymap/walls/2.data
  104.  
  105. Each of these files contains the texture data that will be used
  106. by the engine to draw these walls. The textures must be
  107. rectangular but do not necessarily need to be the same size. The
  108. Telefrag engine will dynamically scale all textures to the correct
  109. size in game. Thus, any size texture will work, however 16 by 8 is
  110. the recommended size.
  111.  
  112. ................
  113. ................
  114. .. ..
  115. .. ..
  116. .. ..
  117. .. ..
  118. ................
  119. ................
  120.  
  121. This is an example wall with a width of 16 and height of 8.
  122. It is recomended to avoid putting Text on walls since the
  123. scaling engine will offten distort the text beyond readability.
  124.  
  125. Now that we've build and rendered our map, lets add some spawnpoints:
  126. First we need to edit 'mydata/mydata.meta' since this stores all
  127. the information about objects contained withing out map
  128.  
  129. Entries withing mymap.meta should look like this
  130.  
  131. object,pos_x,pos_y,ang
  132.  
  133. "object" is a lower case string with no spaces that specifies
  134. which object the engine should create
  135. "pos_x" is a positive float that specifies the x-coordinate of
  136. the object's location
  137. "pos_y" is a positive float that specifies the y-coordinate of
  138. the object's location
  139. "ang" is a positive float between the values of [0, 360) and
  140. specifies the direction the object is facing. This is an optional
  141. parameter and will default to 0 when excluded.
  142.  
  143. Now, to create a spawn point we use the 'spawn' object and place
  144. it in the center of the tile (4, 1). If you decide to inclue the
  145. "ang" property, the player will face that direction when they spawn
  146.  
  147. spawn,4.5,1.5
  148.  
  149. NOTE: The entry 'spawn,4,1' would create the spawnpoint on the
  150. top left corner of the tile (4,1). To create the spawnpoint in
  151. the center of a tile do 'spawn,4.5,1.5' The Telefrag engine will
  152. NOT let you create an object at an integer position and will
  153. automatically add 0.5 to any integer pos_x or pos_y entries.
  154.  
  155. It's best to specify multiple spawnpoints since the Telefrag
  156. engine picks one at random when spawning a player. Telefrag will
  157. always prioritize empty spawn points. The more spawn points you
  158. have the more players your map can comfortably accomidate.
  159.  
  160. At this point you would now be able to load into the map and walk
  161. around.
  162.  
  163. Now lets add some items for our players to pick up:
  164.  
  165. We add items to 'mymap/mymap.meta' just like spawnpoints.
  166.  
  167. ammo,1.5,1.5
  168. health,2.5,1.5
  169. armor,3.5,1.5
  170.  
  171. The following object names have special meanings within telefrag:
  172. "spawn" Players will spawn here and face the same direction as
  173. the spawn object.
  174. "player" The object representing a physical player. This is
  175. reserved by the Telefrag engine and is an invalid entry.
  176. "ammo" These can picked up by the player and replenish ammo.
  177. "health" These replenish health.
  178. "armor" These replenish armor.
  179.  
  180. Now that we've added some items we need to create the sprites for
  181. them. Make the follwing files:
  182. mymap/sprites/ammo.data
  183. mymap/sprites/ammo.meta
  184.  
  185. mymap/sprites/armor.data
  186. mymap/sprites/armor.meta
  187.  
  188. mymap/sprites/health.data
  189. mymap/sprites/health.meta
  190.  
  191. All of these files have identical layouts, so we'll focus on the
  192. ammo.data file for now.
  193.  
  194. +--------------+
  195. | A M M O |
  196. +--------------+
  197. | |""| , , |
  198. | | | /_\ /_\ |
  199. | |__| | | | | |
  200. | |__| |_| |_| |
  201. +--------------+
  202.  
  203. This is an example of an ammo box sprite the you might find within
  204. the ammo.data file. Again, any spize sprite will work, however
  205. the size 16 by 8 is recommended
  206.  
  207. Next we need to edit the ammo.meta file which contains info about
  208. how the engine should handle this object.
  209.  
  210. xscale,0.5
  211. yscale,0.5
  212. voffset,8
  213. value,6
  214.  
  215. "xscale" specifies how wide the sprite should be, if excluded it
  216. defaults to 1, the width of a wall.
  217. "yscale" specifies how tall the sprite should be, if excluded it
  218. defaults to 1, the height of a wall.
  219. "voffset" specifies the vertical offset of a sprite. If you shrink
  220. a sprite by 0.5 vertically, it will appear to float in the air. To
  221. correct this, we shift the sprite down by 8 (the height of the
  222. sprite).
  223. "value" this is the most important value and only applies to the
  224. ammo, health, and armor sprite. It specifies how much the pickup
  225. refils. Since the player has a revolver, we'll give them an extra
  226. 6 shots.
  227.  
  228. Additionall entries:
  229.  
  230. trans,X
  231.  
  232. This is an optional value that can be used for transparent sprites.
  233. This entry states that the char "X" should not be drawn and leaves
  234. a hole in the sprite.
  235.  
  236. NOTE: Do not create a sprite titled "spawn.data", spawnpoints are
  237. a special object and Telefrag will NOT assign a sprite to it.
  238.  
  239. Finally we need to create a sprite for the player:
  240. Make the following files:
  241. mymap/sprites/player.data
  242. mymap/sprites/player.meta
  243.  
  244. The following is an example of the contents of player.data:
  245.  
  246. XXXXXX/"""\
  247. XXXXXX|@ @|
  248. XXXXXX\ + /
  249. XXXXXXX|#|--o
  250. XXXXXXX|#|XX'
  251. XXXXXXX|#|
  252. XXXXXX//X\\
  253. XXXX_//XXX\\_
  254. <telefrag-frame>
  255. XXXXXX/"""\
  256. XXXXXX|:::|
  257. XXXXXX\:::/
  258. XXXXXXX|"|
  259. XXXXXXX|T|
  260. XXXXXXX|_|
  261. XXXXXX//X\\
  262. XXXX_//XXX\\_
  263.  
  264. This is the front and back of a player sprite. It is recomended
  265. that you create 8 frames for the player, one facing each of the
  266. 8 compas directions: N, NE, E, SE, S, SW, W, NW
  267.  
  268. <telefrag-frame>
  269.  
  270. Is a special line that denotes the end of one frame and the start
  271. of another frame. Do not include <telefrag-frame> in the first or
  272. last line of your file. The start of the first frame and end of
  273. the last frame is implicit. All of the frames must be the same
  274. height.
  275.  
  276. The X's within this sprite are intended to denote transparancy.
  277. To indicate this to the Telefrag engine we need to edit the
  278. player.meta file:
  279.  
  280. trans,X
  281.  
  282. Now the engine can correctly draw the player.
Advertisement
Add Comment
Please, Sign In to add comment