Code Monkey home page Code Monkey logo

battle-shapes's Introduction

battle-shapes

A simple 2D battle game written in Rust, using piston_window.

git clone https://github.com/kylejlin/battle-shapes.git
cargo run

Overview

There are two teams: blue (left) and red (right). You control the blue team, and the computer controls the red team (except in sandbox mode, where you control both).

Press keys to deploy troops where your mouse cursor is.

Troops will move toward the opposing side until they die. Along the way, if they encounter enemy troops they will engage them in combat. If they manage to reach the other side, their team will instantly win. The entire screen will turn the color of their team to reflect the victory.

Troops

Troop Key to Deploy Price Health Attack Damage Attack Cooldown (seconds) Movement Speed
Swordsman 1 (0) 30 100 30 0.8 35
Archer 2 (9) 60 100 25 2.0 20
Rider 3 (8) 50 100 25 1.0 80
Shieldsman 4 (7) 40 250 0 N/A 35
Daggerman 5 (6) 50 50 20 0.15 25
Coward Archer Q (P) 60 100 25 2.75 15
Giant W (O) 100 1000 100 3.5 12
Wall A (Semicolon) 10 300 0 N/A 0

Note: for the "Key to Deploy" column, the key in parentheses is the key to deploy for the red team. Normally, this won't do anything because the computer controls the red team. However, this works in sandbox mode, where you control both teams.

Game Modes

All modes are off by default, but you can turn them on with command line flags. They are not mutually exclusive (i.e., you can play with several modes on at once).

Mode Flag Description
Sandbox -s or --sandbox You control both sides.
Big Money -m or --big-money Your money regenerates much faster.
Freespawn -f or --freespawn The normal deployment boundaries don't apply, so you can deploy troops anywhere on the screen.

Note: if you are using cargo run, you have to add a -- before passing in the desired flags. This is so Cargo knows the flags are intended for the executable (this program), not Cargo. For example, if you want to activate all the modes, you would type:

cargo run -- -s -m -f

battle-shapes's People

Contributors

kylejlin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.