Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next Wave Time and Enemy Number #24

Open
4 tasks
emurnane opened this issue Jul 11, 2016 · 2 comments
Open
4 tasks

Next Wave Time and Enemy Number #24

emurnane opened this issue Jul 11, 2016 · 2 comments
Labels
Milestone

Comments

@emurnane
Copy link
Owner

emurnane commented Jul 11, 2016

  • 1. The "Next Wave" time (I believe the GLOBAL.GAMEHOUR variable, but correct me if I'm wrong) — for me, it's always starting at 8:00PM. Is this the default?
  • 2. And is it correct that this is not the time on a particular date but rather, the number of enemies and the number of bullets available during that wave time are an average of all incoming and outgoing mail, respectively, at that time of day, based on the player's entire email data?
  • 3. If so, can someone point me to the location in the code where the average number of incoming enemies is computed?
  • 4. The "Enemy Number" shown in the upper right hand corner of the screen (which I believe is the variable HOURENEMYNUMBER, but correct me if I'm wrong) — similar question to above, is this an average number of enemies received at the given time being played at the moment or something else? If average, can you point me to the location in the code where it's computed?

Please leave a comment to respond to these questions. Mention the question number(s) you're answering (1, 2, 3, or 4), and feel free to link to the relevant source code in the repo.

@emurnane emurnane added this to the Pre-experiment (high priority) milestone Jul 13, 2016
@ik226
Copy link
Collaborator

ik226 commented Jul 18, 2016

  1. at _shouldCreateEnemy() in controller.js, it calls GameInfoDisplay.hourSplash() when:
if (GLOBAL.HOURITR > totalhourloops + (2 * GLOBAL.FPS) && GLOBAL.ENEMIES.length === 0) {
                GLOBAL.HOURITR = 0;
                GLOBAL.HOURENEMYNUMBER = 0;
                GLOBAL.GAMEHOUR++;
                    GameInfoDisplay.hourSplash();
            }

Then, GameInfoDisplay.hourSplash() calls Utils.UTCHourToLocalHour(GLOBAL.GAMEHOUR), that does Date.setUTCHours(GLOBAL.GAMEHOUR).
Here, setting UTC hours with GLOBAL.GAMEHOUR , which starts from 0, makes the date's hour value to be 8 (I believe that's because of our time zone...) . So, I should say this is default.

@emurnane
Copy link
Owner Author

Thanks, Re: 1 — let's change this so the game starts at 6AM (see issue #34) (i.e., test to be sure game starts at 6AM regardless of what timezone the player is located in)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants