Skip to content

flowreen/pixi_tanks_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PixiJS Tanks Game

Overview

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

Features

2D grid-based map

Tank movement using keyboard controls

Firing bullets

Obstacles like walls and hays

Collision detection

Prerequisites

Node.js

npm or yarn

Installation

  1. Clone the repository: git clone https://github.com/flowreen/pixi_tanks_game.git

  2. Navigate to the project directory: cd pixi_tanks_game

  3. Install dependencies: npm install

Running the Game

To start the game, run: npm start This will start the development server, and the game will be available at http://localhost:8080.

Controls

Move Tank: Arrow keys or WASD

Fire Bullet: Spacebar

Reload Bullets: R

Change Tank: T

Project Structure

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