2d shooter Git
Brought to you by:
kvs2
| File | Date | Author | Commit |
|---|---|---|---|
| Extra | 2011-07-10 |
|
[80a5af] First Commit |
| Graph | 2011-07-10 |
|
[80a5af] First Commit |
| States | 2011-07-10 |
|
[80a5af] First Commit |
| .project | 2011-07-10 |
|
[80a5af] First Commit |
| Bot.py | 2011-07-10 |
|
[80a5af] First Commit |
| Bullet.py | 2011-07-10 |
|
[80a5af] First Commit |
| Game.py | 2011-07-10 |
|
[80a5af] First Commit |
| HUD.py | 2011-07-10 |
|
[80a5af] First Commit |
| Main.py | 2011-07-10 |
|
[80a5af] First Commit |
| Player.py | 2011-07-10 |
|
[80a5af] First Commit |
| README | 2011-07-10 |
|
[80a5af] First Commit |
| bot.jpg | 2011-07-10 |
|
[80a5af] First Commit |
| map | 2011-07-10 |
|
[80a5af] First Commit |
| player.jpg | 2011-07-10 |
|
[80a5af] First Commit |
To run the game, you will need python as well as the pygame library. It is recommended that the game be run on Ubuntu(Linux). On Ubuntu : The pygame libray can be found in Synaptic Package Manager. the name of the package is "python-pygame" On other Linux versions: The source and packages for other versions are given on http://www.pygame.org/download.shtml To run the game: cd src python Main.py Instructions to play the game: These movements are with respect to the direction the player is currently facing : W : move forward S : move backward A : move left D : move right Left mouse button : Fire bullet Move mouse to change the direction of the player Z (cheat code for testing purposes) : Decrease the health of the bot To close the game, just press the X (cross) button on the top right The change the map: We have a mapfile called "map" in the main directory. The nodes ihn the mapfile are represented using "indexes". Basically the game world is a 1000X700 pixel map. The x-indexes range from 0 to 49 and y-indexes from 0 to 34 A node is of 1 index size. Thus, there are 50X35 nodes in the map. The first line of map file contains x-indexes of resource(health) nodes The second line of map file contains y-indexes of resource(health) nodes The third line of map file contains x-indexes of obstacle nodes The fourth line of map file contains y-indexes of obstacle nodes The ninth line of map file contains x-indexes of rough tile nodes The tenth line of map file contains y-indexes of rough tile nodes You can leave line no 5-8 as it is for now (it contains features which haven't been implemented as yet) ... Please make sure that there is no space at the end or starting of a line, and be sure to insert a space between two indexes. This is to make sure that our code parses the map file properly.