Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@@@@@@ @@@@@@@@ @@@ @@@@@@@@ @@@@@@@@ @@@@@@@ @@@@@@ @@@@@@@
- @@! @@! @@! @@! @@! @@! @@@ @@! @@@ !@@
- @!! @!!!:! @!! @!!!:! @!!!:! @!@!!@! @!@!@!@! !@! @!@!@
- !!: !!: !!: !!: !!: !!: :!! !!: !!! :!! !!:
- : : :: ::: : ::.: : : :: ::: : : : : : : : :: :: :
- How to play:
- Controls:
- Left Arrow:
- Turn Left
- Right Arrow:
- Turn Right
- Up Arrow:
- Move Forward
- Down Arrow:
- Move Backwards
- X Key:
- Strafe Left
- C Key:
- Strafe Right
- Space Bar:
- Shoot Revolver
- Revolver has 6 shots before you must reload.
- V Key:
- Manually Reload
- Pickups:
- Health:
- Refils part of your health. If you run out of health you die
- and must respawn.
- Ammo:
- Refils a few bullets worth of ammo, you'll still have to reload
- however. Run out of these and you're a stitting duck.
- Armor:
- Refils part of your armor. Armor absorbs half of incoming damage.
- Map building:
- This section is for people who are interested in making their own Telefrag
- maps.
- Getting started:
- First, you'll need to name your map. For this example, we'll call our
- map 'mymap' (without the quotes).
- Start by building the following directory tree:
- mymap/
- mymap/walls/
- mymap/sprites/
- NOTE: The root directory will determine the name of your map
- Next create the following two files:
- mymap/mymap.data
- mymap/mymap.meta
- NOTE: The file names must match the name of the root directory
- The 'mymap.data' file stores the layout of your map
- The 'mymap.meta' file stores the location of items and spawnpoints
- Now let's make a simple map by editing 'mymap.data':
- 1,1,1,1,1,1,1,1,1,1,1,1,1
- 1,0,0,0,1,0,0,0,1,0,0,0,1
- 1,0,2,0,1,0,2,0,1,0,2,0,2
- 2,0,2,0,0,0,2,0,0,0,2,0,2
- 2,2,2,2,2,2,2,2,2,2,2,2,2
- This will create zig-zag style map layout.
- Each number indicates which texture will be used to draw that wall.
- The top left tile is at location (0, 0)
- The number 0 indicates that there is no wall here.
- The perimeter of your map MAY NOT contain the value 0. This
- prevents players from falling off the map.
- All numbers in mymap.data must be positive integers or 0
- The numbers CAN be longer than one digit. The following is valid:
- 10,134,512
- 132,0,516
- 243,123,6
- Maps must be rectangular, each line must contain the same number
- of commas. The map file may only contain the following characters
- "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "," "\n" The map file may
- not contain spaces and my not have two consecutive commas.
- "1,1,1,1,1" VALID
- "1,1,,11,1" INVALID: ",," Is not valid
- Now for every number used within mymap.data a corresponding wall
- texture must be created:
- Since we used the numbers 1 and 2 (0 empty space, not a wall)
- we will create the follwing two files
- mymap/walls/1.data
- mymap/walls/2.data
- Each of these files contains the texture data that will be used
- by the engine to draw these walls. The textures must be
- rectangular but do not necessarily need to be the same size. The
- Telefrag engine will dynamically scale all textures to the correct
- size in game. Thus, any size texture will work, however 16 by 8 is
- the recommended size.
- ................
- ................
- .. ..
- .. ..
- .. ..
- .. ..
- ................
- ................
- This is an example wall with a width of 16 and height of 8.
- It is recomended to avoid putting Text on walls since the
- scaling engine will offten distort the text beyond readability.
- Now that we've build and rendered our map, lets add some spawnpoints:
- First we need to edit 'mydata/mydata.meta' since this stores all
- the information about objects contained withing out map
- Entries withing mymap.meta should look like this
- object,pos_x,pos_y,ang
- "object" is a lower case string with no spaces that specifies
- which object the engine should create
- "pos_x" is a positive float that specifies the x-coordinate of
- the object's location
- "pos_y" is a positive float that specifies the y-coordinate of
- the object's location
- "ang" is a positive float between the values of [0, 360) and
- specifies the direction the object is facing. This is an optional
- parameter and will default to 0 when excluded.
- Now, to create a spawn point we use the 'spawn' object and place
- it in the center of the tile (4, 1). If you decide to inclue the
- "ang" property, the player will face that direction when they spawn
- spawn,4.5,1.5
- NOTE: The entry 'spawn,4,1' would create the spawnpoint on the
- top left corner of the tile (4,1). To create the spawnpoint in
- the center of a tile do 'spawn,4.5,1.5' The Telefrag engine will
- NOT let you create an object at an integer position and will
- automatically add 0.5 to any integer pos_x or pos_y entries.
- It's best to specify multiple spawnpoints since the Telefrag
- engine picks one at random when spawning a player. Telefrag will
- always prioritize empty spawn points. The more spawn points you
- have the more players your map can comfortably accomidate.
- At this point you would now be able to load into the map and walk
- around.
- Now lets add some items for our players to pick up:
- We add items to 'mymap/mymap.meta' just like spawnpoints.
- ammo,1.5,1.5
- health,2.5,1.5
- armor,3.5,1.5
- The following object names have special meanings within telefrag:
- "spawn" Players will spawn here and face the same direction as
- the spawn object.
- "player" The object representing a physical player. This is
- reserved by the Telefrag engine and is an invalid entry.
- "ammo" These can picked up by the player and replenish ammo.
- "health" These replenish health.
- "armor" These replenish armor.
- Now that we've added some items we need to create the sprites for
- them. Make the follwing files:
- mymap/sprites/ammo.data
- mymap/sprites/ammo.meta
- mymap/sprites/armor.data
- mymap/sprites/armor.meta
- mymap/sprites/health.data
- mymap/sprites/health.meta
- All of these files have identical layouts, so we'll focus on the
- ammo.data file for now.
- +--------------+
- | A M M O |
- +--------------+
- | |""| , , |
- | | | /_\ /_\ |
- | |__| | | | | |
- | |__| |_| |_| |
- +--------------+
- This is an example of an ammo box sprite the you might find within
- the ammo.data file. Again, any spize sprite will work, however
- the size 16 by 8 is recommended
- Next we need to edit the ammo.meta file which contains info about
- how the engine should handle this object.
- xscale,0.5
- yscale,0.5
- voffset,8
- value,6
- "xscale" specifies how wide the sprite should be, if excluded it
- defaults to 1, the width of a wall.
- "yscale" specifies how tall the sprite should be, if excluded it
- defaults to 1, the height of a wall.
- "voffset" specifies the vertical offset of a sprite. If you shrink
- a sprite by 0.5 vertically, it will appear to float in the air. To
- correct this, we shift the sprite down by 8 (the height of the
- sprite).
- "value" this is the most important value and only applies to the
- ammo, health, and armor sprite. It specifies how much the pickup
- refils. Since the player has a revolver, we'll give them an extra
- 6 shots.
- Additionall entries:
- trans,X
- This is an optional value that can be used for transparent sprites.
- This entry states that the char "X" should not be drawn and leaves
- a hole in the sprite.
- NOTE: Do not create a sprite titled "spawn.data", spawnpoints are
- a special object and Telefrag will NOT assign a sprite to it.
- Finally we need to create a sprite for the player:
- Make the following files:
- mymap/sprites/player.data
- mymap/sprites/player.meta
- The following is an example of the contents of player.data:
- XXXXXX/"""\
- XXXXXX|@ @|
- XXXXXX\ + /
- XXXXXXX|#|--o
- XXXXXXX|#|XX'
- XXXXXXX|#|
- XXXXXX//X\\
- XXXX_//XXX\\_
- <telefrag-frame>
- XXXXXX/"""\
- XXXXXX|:::|
- XXXXXX\:::/
- XXXXXXX|"|
- XXXXXXX|T|
- XXXXXXX|_|
- XXXXXX//X\\
- XXXX_//XXX\\_
- This is the front and back of a player sprite. It is recomended
- that you create 8 frames for the player, one facing each of the
- 8 compas directions: N, NE, E, SE, S, SW, W, NW
- <telefrag-frame>
- Is a special line that denotes the end of one frame and the start
- of another frame. Do not include <telefrag-frame> in the first or
- last line of your file. The start of the first frame and end of
- the last frame is implicit. All of the frames must be the same
- height.
- The X's within this sprite are intended to denote transparancy.
- To indicate this to the Telefrag engine we need to edit the
- player.meta file:
- trans,X
- Now the engine can correctly draw the player.
Advertisement
Add Comment
Please, Sign In to add comment