Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A Multiplayer Geography Game Using WebSockets (github.com/abrenaut)
220 points by abrena on Aug 19, 2016 | hide | past | favorite | 69 comments



We used to play a game like this at my last company using a 4'x6' foamboard map that someone had pulled out of the trash. We would stand far enough back that you couldn't read the text on the map, use a generator to select a random country, then throw darts. Closest dart wins the point. It worked surprisingly well since even if you really knew your geography you still had the challenge of actually getting the dart there.


I really like it - a couple of opinions though - the time could be extended just a bit, maybe its my pre-coffee state but I sometimes needed a couple more seconds just to think about the name. Also consider changing the scoring to be relative - getting on the right continent would be worth something - for some of these you could guess close enough that if you went and looked at a map for that guess you would be close enough to find the city - but it was still technically too far to count. Agree with someone else that your total score should be shown somewhere.


I wish it worked on mobile! I'll check it out on my desktop though.

Edit: just played it. Awesome. A few suggestions:

- show me my total score! Unless I'm on the leaderboard, I don't know what it is

- it's unclear whether the "you are #x of Y players" is referring to my standing on just that turn, or the last 20, or what

- more cities, as others have said. Or at least shuffle it better so it's not as obvious when I've gone back to the beginning

Also, a recommendation on making the mechanics work on mobile: make it a race to zoom into the city the fastest. So you have to "pull" the map as fast as you can until the correct location is on the center of the screen. You can zoom as high resolution as you want for more points. This would eliminate the problem of imprecise tapping on mobile, and make it a fun finger motion to practice.


It took me a while to realize, but "you are #x of Y players" refers to the closest people to that specific city.

I was pretty pleased to get a few #1s. It countered my several "too far!"s.


I couldn't even get #1 in my current city or a few others I've lived in! You hacker news users are so precise. :)


Easy to be precise if they are cheating :)

https://news.ycombinator.com/item?id=12321468


Did anyone else see this and want to cheat?

http://imgur.com/a/l4n85

Method:

- grab cites.db from repo and dump cities to file with sqlite

- use perl to convert data to json

- use dev console to import cities object

- one quick js function to get called when websockets gives us a 'new_turn' message that sends a 'answer' message with data from our lookup table

I know I cheated, but for me this was super fun. (I never make it to the top of a score board in videos games without some sort of hackery involved).


This is a lot of fun but I'd also recommend allowing zoom for greater precision then resetting after each question. Pretty simple JS commands for Leaflet to handle and would make a HUGE difference - not sure how folks are getting so precise on such a small map :)


Someone has probably already written some JS that plays the game automatically.

The way I'd do it is 1) track the current turn, 2) look up the city's coordinates using a reverse geocoder like OSM's Nominatim[1], and 3) draw a marker at the location using Leaflet.

[1]: http://wiki.openstreetmap.org/wiki/Nominatim



Nicely done! I'm not that good at JS to be honest :P


If I know precisely the location of a city (like Kyiv, Istanbul in my case) I was able to pin it with 20 to 45km precision. I think it's close enough on a world scale.


It would be nice indeed but the fact that you cannot zoom limits the number of requests to the map tiles provider.


You now belong to the club: http://worldmapswithout.nz


it's actually there, you can move the image to the left and you'll see it. it's "off screen"


The map determines the move gesture as a click, placing your guess for Wellington as being in the Tasman ocean. But then, at least it's not asking for Tonga.


Uh both America and Asia are out of view by default for me, and NZ has to be scrolled to just like those continents.


Really fun game! Reminds me of https://geoguessr.com which drops you in a random location (in Street View mode) and your task is to pinpoint the location on a map.


The worldmap seems to not include new zealand, because it takes the browser's zoom level (which i have set to high), and scales it badly to clip out the sides.


You can drag it. It should include it by default though, I had the same issue.


you can't drag it, because as soon as you clicked, it chose the location of the answer, and so you get it wrong!


I can. Using mouse, OSX, Chrome.


Super fun. I'd add more locations, though... I quit playing once I got through the whole list.

Also, there were a handful of times when the timer would "jump" right at the end (before I'd gotten my pin placed)

EDIT: Also, just remembered... This also exists: https://www.tripadvisor.com/TIQGame


Addictive and fun. The timing on the turns is just right. If you're looking for feedback, I'd suggest putting the leaderboard up and to the right on bigger screens. I had to keep scrolling down in between turns to see how I was doing.

Also, several times it didn't register my clicks and I have to try a few times before it worked.


So an alert that just says "xss" just started popping up after a few cities. Did somebody discover something mid-game and start injecting that?

http://i.imgur.com/SkXWnvV.png


It seems to be related to the user names. Just received a 'Howdy' alert box :)


i came across the same issue. and i was in third place. ;(


Fun. Quite tricky when it comes to remembering where each of the Guineas (Equatorial Guinea, Guinea-Bissau, Papua New Guinea) is.

One issue: the cursor seemed to be inaccurate for me most of the time, even when I knew exactly where the location was. For me, the click registered at the top of the crosshairs (instead of the middle). Further, I might change the cursor to be a map pin, and use the pin's point as the accepted answer.


This is really great.

A few thoughts -Did you have any trouble with the sockets library? -I saw you explicitly mentioned "plane_distance", so are you planning on adding Haversine distance or something else? -Maybe make the map take up the entire screen? Status and first few on the leaderboard could go in the ocean.


The socket library (Flask SocketIO) works great and has a good documentation.

I used plane distance because it's faster to compute and the accuracy is good enough for this use case.

Regarding the UX I think it's a good idea to make the map take the entire screen.

Thanks for the feedback


It might be useful to allow changing one's guess. It's pretty annoying when you misclick in the middle of the map and cannot pick the correct location.


Very fun, but a bit stressful.

Making games take a determined number of turns would allow players to rest.

Also, displaying the score right along the windows would be nice.

Other than that, great work!


Really fun. Showing a leaderboard is a good idea. Also, sometimes I wanted to adjust my guess with another click. Something to think about.


Perhaps add a rate of scoring? Total score / no. of attempts.

And, if possible, a magnifying glass to the cursor.

Thanks for the game, really enjoyed it!


You're going to make mad money. (Or someone else who steals your idea and makes it work on mobile.)

Awesome game and idea!


There is already apps working on the same principle. iirc I played a game like this 1 or 2 years ago, but it was a turn based game. Very fun to play. Also, this game is very nice to learn web socket, the code and flow is easy to understand.


The 'averaged' location of all answers for the current question would be quite interesting to see.


Addictive and fun! Thank you!

The fact that the crowd playing did not bring it down load-wise is just as impressive.

Back-end deployment story?


I was a bit worried when I saw so many people playing simultaneously because the game is hosted on a 2€ VPS at OVH but it worked great!


There is a bug somewhere where it doesn't register for clicks after a few rounds. Chrome 52, OS X.


Same on Windows. Some clicks get unregistered. I had to click multiple times.


Maybe I missed it, but it would be good to display the player's current score.


Very nice game!

I've written a similar game a while back (single player, though): http://david-peter.de/quizzity/


Great UI!

Thanks for the feedback


Love it, played for like 30 minutes. There used to be a great Facebook game called GeoChallenge similar to this, for some reason got terminated and I never played another Facebook game after.


As somebody that consistently does good in these geography games (even competing with other HNrs), I wonder if is there a way to capitalize/use this skill?


Sometimes click does not register. Very irretating with this small amount of time givet to click. Also map is way too small on high resolution screens. Other than that very cool idea!


I loved it!! Would it even better if we have a certain level of zooming to improve the location accuracy. I missed out on some European cities. I think it was Copenhagen.

Nice work!


Someone found XSS bug http://i.imgur.com/gni56Rf.png


created a github issue... This is why we cant have nice things lol


Smaller resolution + New Zealand = automatic loss :(


I enjoy playing this game. But the map is cropped and New Zealand does not appear, so it was impossible for me to pin Wellington.


New Zealand does appear. If the map appears cropped, you can move it by dragging with the mouse.

Awesome game.


Also, I'd love to have a few seconds when the solution is given to learn from my mistakes. Right now it's going too fast... (I guess that would be a "training mode")


Looks like someone has found an XSS attack :D


Great game and to make it even better find a graphic designer/designer friend to make this pop even more!


This is quite fun, although I would say the map needs to be a bit bigger to allow for better precision.


It doesn't work on mobile. The UI is cluttered to a level of unplayableability.


clicking the on small islands seems to be too hard but other than that a great idea.


It was fun until someone inserted alerts with "xss" as text.


r/mapswithoutnz

Great fun all the same!


I'm addicted already!! Thank you for making this


Very cool, but how many turns?!?!/


I could play this all day. fun.


I can't stop playing!


i played for a bit, it was fun. thank you for sharing.


Loved the game.


Very fun game!


this is really fun




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: