Simple SIx game tracker

Howdy,

I’ve been working on a game you can see over at its website, and sometimes get updates in it’s playcanvas blog. Recently I implemented the some networking - a game tracker allowing people visiting the website to see any other people playing the game.

It looks like this:

The important bit is the text ‘Connected to Tracker.’ It shows that your webpage can reach through the internet and touch … my computer:


(Hey look, someone connected and started a game - actually, this was me)

This then shows up in the webpage (until the connection/page is closed):

You can’t currently join.

So, why am I posting this?
Pretty much, Will had some issues while testing it, and I want to get some others involved in testing it. I made a couple changes yesterday which made the tracker survive high ping times better, but I need people to test it from (ideally) all over the world. Even just going and seeing if there are games listed will help me check that people can see the tracker.
The tracker can take up to 10 seconds to show a game.

If you’ve tried to play my game before, it would be great if you could clear your browsers cache. I’m looking into ways to remove the need for people to do this.

Here’s a link to its website again.

Post Mortem
Uh, um. Yeah, you can’t join games yet. Thats coming when I figure out webRTC. You’ll have to wait another couple weeks at least.

Now I just see Connecting to Tracker when I hit Play. :confused:

That one was my fault. I made a mistake that left the tracker offline for the last hour or so. Sorry about that. It should be back up now.

Thanks to all the people who have connected to the tracker. I have now had succesful tests of the tracker from nearly every continent. (Japan, Lithuania, Turkey, Phillipines, Russia, US, Uk, Ukrain, South Africa and Germany to name a few).
The tracker appears to be working relatively reliably (or is at least able to recover from any issues).

I’ve made a few changes to the tracker and it is now feature-complete. I will continue monitoring it closely for the next day or two.

Thanks to all who have helped in testing.


The biggest issue people have had is unrelated to the tracker: the game sometimes gets stuck on loading (ie sitting at “Loading Object 4/9” or "Loading Script 9/18."
I am unsure why this is happening and suspect it is cachine rearing it’s head again. I have a plan though, and will implement it over the next few days.

Hmmm. Now just goes to http://parked-domain.org/ when I hit the HOST button. :crying_cat_face:

That sounds like a caching problem. I changed the file name of the hosting page from ‘game.html’ to ‘host.html.’ Try in an incognito tab or hard-reloading the page (in chrome its ctrl+shift+R).

I’m definitely going to have to figure out how to stop things caching.

You’re right. Clearing the cache fixed it. I’m still not seeing the other player though when I run with 2 tabs. Any suggestions?

Looking at the tracker records, it all seems to be working. The log shows things like:

15/11/24 00:15:43 ||New ID: 18 is <<<IP removed>>>
15/11/24 00:15:43 ||From 17: LIST
15/11/24 00:15:43 ||From 18: LIST
15/11/24 00:15:44 ||To   17: LIST{"games": []}
15/11/24 00:15:44 ||To   18: LIST{"games": []}
15/11/24 00:15:44 ||End ID: 18
15/11/24 00:15:44 ||New ID: 19 is <<<IP removed>>>
15/11/24 00:15:45 ||From 19: HOST{"level":"test_level_2","comment":"","name":"DefaultPilot"}
15/11/24 00:15:53 ||From 17: LIST
15/11/24 00:15:54 ||To   17: LIST{"games": [{"comment": "", "id": 19, "name": "DefaultPilot", "level": "test_level_2"}]}
15/11/24 00:15:55 ||From 19: HOST{"level":"test_level_2","comment":"","name":"DefaultPilot"}
15/11/24 00:16:00 ||End ID: 19

(I assume you’re the guy in the UK who connected roughly an hour ago)
So the tracker is receiving information from you.
You can see that one instance (id 19) hosts a game using the ‘HOST’ command, and then the next time id 17 requests a game list, that game information is relayed along.

I wonder if it’s a client-side javascript issue? Are there any warnings appearing in the console?

Another thought is that you didn’t host the game for very long (about 10 seconds), and it is possible that it simply didn’t refresh the page in time (sometimes things happen a little slowly for an unknown reason).


And that’s GMT the tracker records in, not local time. It is mid-day here, not mid-night…