Giter Site home page Giter Site logo

victorqribeiro / towerdefense Goto Github PK

View Code? Open in Web Editor NEW
22.0 4.0 4.0 9.26 MB

A tower defense game written in vanilla JavaScript

Home Page: https://victorribeiro.com/towerDefense/

License: MIT License

CSS 0.41% HTML 3.89% JavaScript 95.70%
tower-defense javascript

towerdefense's Introduction

Tower Defense [W.I.P]

A (unfinished) tower defense game written in vanilla JavaScript.

screenshot

Live version

Safari (iOs) users may need to disable Prevent cross-site tracking to view canvas applications, such as this game.

Controls

Mouse / Left click - Select objects and place towers.

Keyboard keys:
1 - Single Cannon Tower

2 - Double Cannon Tower

3 - Double Missile Launcher

4 - Single Missile Launcher

D - Deletes a selected item

Enter - Calls the wave of enemies

Space - Pause game

To either buy or delete items you need to have money

ToDo

  • Finish the game
    • Right now this is more a prototype than a game, since it doesn't end.
    • Implement victory
    • Implement defeat
  • Refactor code
    • Remove some redundancies (Almost every class has a distance function)
    • Create utils.js and move helper functions to it (including a general distance function)
    • Check for hardcoded values
  • Create GUI
    • Mobile
    • Desktop
  • Improve enemies
    • Airplanes behavior
    • Tanks aggressiveness
  • Balance game
    • Price of towers
    • Amount of money you get by killing a enemie
    • How much damage each tower does
    • How much damage each tank does
  • Create world map
    • A world map consists in a pack of levels of increasingly difficulty
  • Level generation
    • Improve level generation
    • Export function so it can be called from the browser to generate new levels
  • Sound Manager
    • Merge sound and music manager
    • Add playlist to the transiction feature (smoothly going from a song to another)
  • Fix worker and manifest.json to it can be installed as a PWA

For Programmers

If you open the console and call:

reload() - It start cycling to all possible texture combinations

transposeMap() - It transposes the map. Intended to adapt the map for both horizontal and vertical screens

Navigate to levelGenerator folder and call:

node levelGen.js

to generate a new map (saves a map.json file in the parent folder)

Credits

Textures by Kenney - www.kenney.nl

Sounds from everywhere - I'll keep better track of where I got the sound and music next time, sorry

towerdefense's People

Contributors

victorqribeiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

pbmcube hookdump

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.