stetson / Capture-The-Flag

Proof of concept for real-time applications on Node.js
Other
4 stars 0 forks source link

Server changes players' team rapidly. #78

Closed ghost closed 13 years ago

ghost commented 13 years ago

I'm unsure of what specific detail is causing it, but here is all the info.

Sean started a game with gps coordinates on campus. I joined the game, way off campus.

I'm in observer mode outside of the boundaries. Sean is in the boundaries, but has no assigned team and is NOT in observer mode.

My team team keeps rapidly changing.

Here is a json dump of the game when it was happening: { "Hello" : { "blue" : 13, "blue_bounds" : { "bottom_right" : { "angular_distance" : 0.00017861818372828168, "bearing" : 2.356194490125, "latitude" : 29.026896667430556, "longitude" : -81.29010697359251, "offset" : 1.1379780560965362 }, "top_left" : { "angular_distance" : 0.00012630212895749262, "bearing" : 4.7123889802500001, "latitude" : 29.034133246325066, "longitude" : -81.30665980659228, "offset" : 0.8046720003073461 } }, "blue_flag" : { "angular_distance" : 0.00011367191606174336, "bearing" : 3.1415926535000001, "latitude" : 29.027620578960313, "longitude" : -81.29838309999934, "offset" : 0.7242048002766115 }, "blue_flag_captured" : false, "blue_score" : 0, "last_update" : "2011-04-03T20:42:51.543Z", "origin" : { "latitude" : "29.0341335", "longitude" : "-81.2983831" }, "players" : { "05B4AEE2-007D-41BF-84E1-C84CD5A2D404" : { "accuracy" : "38", "game_id" : "Hello", "last_update" : "2011-04-03T20:42:51.543Z", "latitude" : "29.0341335", "longitude" : "-81.2983831", "name" : "Hello", "user_id" : "05B4AEE2-007D-41BF-84E1-C84CD5A2D404" }, "3A32651F-68F1-4645-Y688-6879E2ECEE710" : { "accuracy" : "8.0", "game_id" : "Hello", "has_flag" : false, "latitude" : "29.034799933433533", "longitude" : "-81.2862753868103", "name" : "Jeremy", "observer_mode" : true, "team" : "blue", "user_id" : "3A32651F-68F1-4645-Y688-6879E2ECEE710" } }, "red" : 13, "red_bounds" : { "bottom_right" : { "angular_distance" : 0.00012630212895749262, "bearing" : 1.57079632675, "latitude" : 29.034133246326363, "longitude" : -81.29010639340774, "offset" : 0.8046720003073461 }, "top_left" : { "angular_distance" : 0.00017861818372828168, "bearing" : 5.4977871436249997, "latitude" : 29.04136982522086, "longitude" : -81.30666038694824, "offset" : 1.1379780560965362 } }, "red_flag" : { "angular_distance" : 0.00011367191606174336, "bearing" : 0, "latitude" : 29.040646421039693, "longitude" : -81.29838309999995, "offset" : 0.7242048002766115 }, "red_flag_captured" : false, "red_score" : 0 }, }

ghost commented 13 years ago

I'm going to guess that this is happening every time there aren't enough players to start the game. If possible, could you create a boolean to let the client know that the game is in progress?

Foe example, right now if there is only 1 player, there is no way for the client to know that the game isn't "active", short of doing logic on the front end, which we wish to avoid.

thinkjson commented 13 years ago

There are no checks in place to start the game. As soon as one person joins the game, it is active. If no one updates within 20 minutes, the game is deleted.

ghost commented 13 years ago

We're retarded.