This is a 2D tank game built using PixiJS and TypeScript. The game features a grid-based map where tanks can move around and fire bullets. The game also includes obstacles like walls and hays that the tanks cannot move through.
Example: https://gyazo.com/2544310cb8c2cf0a938403c2a2800e6f
2D grid-based map
Tank movement using keyboard controls
Firing bullets
Obstacles like walls and hays
Collision detection
Node.js
npm or yarn
-
Clone the repository: git clone https://github.com/flowreen/pixi_tanks_game.git
-
Navigate to the project directory: cd pixi_tanks_game
-
Install dependencies: npm install
To start the game, run: npm start This will start the development server, and the game will be available at http://localhost:8080.
Move Tank: Arrow keys or WASD
Fire Bullet: Spacebar
Reload Bullets: R
Change Tank: T
src/: Source files
Game/: Game logic and classes
Controller/: Game controllers
Data/: Constants and enums
Objects/: Game objects like tanks, bullets, etc.
Scene/: Game scenes
assets/: Game assets like images
webpack.config.js: Webpack configuration file
tsconfig.json: TypeScript configuration file