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

No more aeroplanes. #9

Closed
popey456963 opened this issue Dec 14, 2014 · 16 comments
Closed

No more aeroplanes. #9

popey456963 opened this issue Dec 14, 2014 · 16 comments
Labels

Comments

@popey456963
Copy link

Am I missing something, or after a certain period (less than 15 minutes), do no more planes come?

http://i.imgur.com/MUW6K3c.png (just, ignore the score.)

Running chrome, windows 7.

@zlsa
Copy link
Owner

zlsa commented Dec 14, 2014

Is there anything printed out in the console after it loads (and about 10 aircraft are created)? The updated version is 2.1.1, upper-right corner while loading.

@popey456963
Copy link
Author

I get this message:

http://pastebin.com/WX7CdHr2

Which seems that creating aeroplanes is definitely working. I will land/fly all planes and see if more are generated.

@jvt
Copy link

jvt commented Dec 14, 2014

Just like to add in my log output here, maybe it'll help: http://pastebin.com/0Yy45gcJ

It seems like the plane generation is working until it reaches a certain number at which point it will stop generating any more.

@popey456963
Copy link
Author

It seems as if it isn't a problem generating the aeroplanes, it's actually a problem calling the function which generates the aeroplanes.
Where is the "aircraft_new()" function called?

@psycho202
Copy link
Contributor

Popey: the aircraft_new function is being called in airport.js.
At lines 256 to 260 for departures and at lines 296 to 303 for arrivals.

Both of these are being called in addAircraft, at line 227 in airport.js.

@joallard
Copy link

+1 on Firefox Aurora 36

@zlsa zlsa added the bug label Dec 15, 2014
@joallard
Copy link

I'm debugging around a little. As I understand it: game initally adds some departure, and that function will set up timeouts to add some more departure, based on the timeout parameter it receives. That parameter would be based on the big timeout array the game receives as options. But in the array, the timeout parameter the function will receive is set to false, hence no timeout. ("timeout" comes up a lot in this comment, but that is the nomenclature used in the code)

@zlsa
Copy link
Owner

zlsa commented Dec 15, 2014

Can reproduce, fix in progress.

I've never played it for more than about ten minutes so I never encountered this bug...

@joallard
Copy link

I just noticed it wasn't a big setting array, but rather just the timeouts added by the game to the queue, as async tasks. The false param on the call at airport.js:233 (Airport#addAircraft()) looks suspicious.

@zlsa zlsa closed this as completed in 1cd8565 Dec 15, 2014
@zlsa
Copy link
Owner

zlsa commented Dec 15, 2014

For testing, you can run the command timewarp 100 without a callsign (warning: high numbers will slow down your computer); to return to normal speed, type timewarp 1. This bug should be gone now.

@joallard
Copy link

Fix confirmed. However, the spawn rate is now too high. My list keeps growing and growing.

@jvt
Copy link

jvt commented Dec 15, 2014

The spawn rate is definitely too high. It's very hard to deal with this ever-growing list of arrivals.
screen shot 2014-12-14 at 11 28 25 pm

@joallard
Copy link

Maybe you could put a debug option to turn off spawn, and get a log of how fast we clear the planes, so we can estimate a natural frequency at which to make them respawn?

@joallard
Copy link

...or you could always monkeycode and play to find out that "ideal" rate instead of having to release yet another feature ;)

@zlsa
Copy link
Owner

zlsa commented Dec 15, 2014

The rate is set in each airport individually (so you can have a small airport with one arrival per hour, not that anyone would ever want that). I've raised the time for all the airports a bit but I'm pretty sure there's now an exponential amount of arrivals.

@popey456963
Copy link
Author

Great to see this issue was resolved.

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

5 participants