Giter VIP home page Giter VIP logo

node-defender-game's People

Contributors

cjsaylor avatar jrbasso avatar neptunz avatar young-steveo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

digideskio

node-defender-game's Issues

Achievements

This ticket is separate from the scoring one, since we don't need it to be done before Wednesday.

We talked about adding some achievements that are worth points. We can brainstorm these here.

  • Collateral Chaos - Hit X enemies with a single attack
  • Clear Streak - Get a Clearing Bonus X times in a row
  • Melee Exterminator - Take less than X damage from melee opponents.
  • Turtle Time - Reduce total incoming damage by X (basically, smart use of defensive mode)

Create a collection of attack modes

Create an object to hold all attack modes. This should lazy load the attacks from the config file (the alias needs to be added to the config).

It will avoid the attack mode be loaded for each player and it will dynamically be loaded without change the player code.

Target Undefined

Sometimes the client sends something wrong to the server (or sends undefined maybe) and the game reacts weird by not actually attacking anyone.

This should instead fall back to attacking a random target

Round 1 is a no-op for the player

Maybe a bug, but more a question of how we want to handle the first round.

Currently, the server generates "round 1" before the client does anything, and then in the on('round') callback event, the player makes a target, etc. So, the player doesn't start taking actions until round 2. Kinda.

Might just be a phrasing/wording thing on the client to handle this.

Should a player's death be shown for all?

The server is emitting a message to the defender channel instead of to the individual socket when a player dies. Anyone currently playing will see that player's death message with the score.

This is unintended but is kind of cool at the same time. Should we limit this to the socket or keep it on the channel?

Verify and fix reporting.

Sometimes the player attacks multiple targets per round, but the reporting seems to show the player attacking the same target on that round. Might be server side responding incorrectly to the client.


Additional minor tweak: the phrasing for "Targeting Enemy" text is somewhat ambiguous.

Calculate and store player score

Calculation Factors:

  • 1,000,000 for clearing all enemies and forcing a new wave to spawn.
  • 100,000 per round survived
  • 10,000 per enemy
  • 100 per point of damage dealt to enemies

Todo:

  • Store total damage done in the player object
  • Have player object listen to enemy death for tallys

Things to consider:

  • Possibly have a per mob score modifier (ie, swarmer = 0.1, bruiser = 2, trooper = 1, etc)
  • If an enemy has 1 hit point, and the attack does 5 damage, do we award 500 points for damage done, or do we only award 100 points, since the rest is "overkill." I'm happy either way, just not sure which.

Update Collateral Damage mode

Currently this mode hits every enemy from the same wave, regardless of enemy position.

After some discussion:

  1. This should be changed to hit all enemies from all waves who are standing on the same rank position (0 - 5)
  2. Also, need to verify that collateral damage mode really blows away the Cluster mob.

Things to consider:

  • Most ranged mobs spawn in one place and never move, since they don't need to do so (not including the flyer who moves away from the player as an attempt to do more damage). After this change, should the ranged mobs kind of shuck-n-jive around a bit now?
  • If this change makes it harder to hit large groups (before, it was easy, you just wait for a large wave) then we might consider making the collateral damage do more than 1 splash damage.

Top 10 aggregation

db.results.aggregate([{$sort: {round: -1}}, { $group: { _id: "$username", round: { $first: "$round" } } }, {$sort: {round: -1}}, {$limit: 10}])

Records the highest round attained, however this can be swapped out pretty easily for some sort of score calculation.

Username allow XSS

If the client username is something like <script>alert("You guys are poops");</script> this script is being executed on the top 10 web page.

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.