News for hackers. Stuff that matters.
Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @08:50AM (#30733344)
Hi HN, I made Back Of Your Hand, a map-based game where you're given random street names and you have to locate them on the map. You can play solo or compete with friends on other devices.

I made it for my dad as a Christmas present. It also gave me an opportunity to learn about geocoding, etc.

Tech: serverless, Leaflet, Turf, Svelte, TypeScript, Cloudflare pages. I tried to use as many open / free tools as I could. I originally used map tiles from OpenStreetMap but they were discontinued so it uses Mapbox and Maptiler now.

Questions / feedback welcome. I also wrote a blog post with more information: https://adamlynch.com/back-of-your-hand. The code: https://github.com/adam-lynch/back-of-your-hand

Warning: it’s pretty difficult, unless your streets are numbered :)

Re:Show HN: A game that tests how well you know your local area by kuu on Saturday March 19, 2022 @06:01PM (#30737946)
First of all: it's really cool and fun! Congratulations!

As a small feedback: adjustable radius would be more fun. For example in the town were I had my childhood, this area is too big and takes other neighbourhood/cities that I don't know, but for where I live now it fits great.

Again, nice job and congratulations for making it!

Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @06:05PM (#30737975)
Thank you :)

This has come up so much. I'll be adding it, thanks!

Re:Show HN: A game that tests how well you know your local area by adenadel on Saturday March 19, 2022 @07:00PM (#30738345)
Another thing is that it seems you are sampling with replacement. I placed a circle in a rural area (where I grew up) and in one round I got the same street for 3/5 of the selections (and there were 10+ streets within the radius).
Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @07:30PM (#30738525)
Thanks, will look into it!
Re:Show HN: A game that tests how well you know your local area by adamlynch on Tuesday March 22, 2022 @04:54AM (#30764000)
This is now fixed! (Thanks to a contribution by johrpan)
Re:Show HN: A game that tests how well you know your local area by adamlynch on Sunday March 20, 2022 @12:11PM (#30743866)
For now, I've reduced the circle radius by 20%. I plan to make it adjustable in the future.
Re:Show HN: A game that tests how well you know your local area by TimPC on Saturday March 19, 2022 @12:29PM (#30735094)
The circle is a bit large as in larger than a single neighborhood for my city. I feel like the game is useful when it asks you how well you know a single neighborhood. It’s less interesting when it asks you how well you know 2.5 neighborhoods.
Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @12:52PM (#30735357)
Thanks for the feedback. I'm considering adding difficulty modes or a way to change the radius. I'd rather that people wouldn't get a perfect score too easily though
Re:Show HN: A game that tests how well you know your local area by TimPC on Saturday March 19, 2022 @01:51PM (#30735912)
I think it’s more important for the game to be meaningful than difficult. How well do you know a neighborhood is deeply meaningful. How well do you know 2.5 neighborhoods isn’t. I’d strongly recommend sacrificing difficulty for meaning here.
Re:Show HN: A game that tests how well you know your local area by bfung on Saturday March 19, 2022 @09:49PM (#30739275)
It’s def a good positive reinforcement to give people a good feeling that they know their own neighborhood.

Having the next 1.5 neighborhood is also valuable: if you live so close, it’s not a stretch to go learn the neighboring neighborhood (in fact, why not!?).

There maybe a level of “insult” (you don’t really know your ‘hood outside of the 5 streets), but used positively, I think the game is great.

Re:Show HN: A game that tests how well you know your local area by mathgeek on Saturday March 19, 2022 @04:22PM (#30737255)
This is relative to the density of where you are playing. The default radius out in rural areas doesn't have enough roads, for example. A customizable radius or geofence sounds appealing.
Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @04:35PM (#30737368)
I agree (and what you want out of the game). I wonder is there a "number of streets" which is a better sweet spot / a better default, rather than a radius
Re:Show HN: A game that tests how well you know your local area by adamlynch on Sunday March 20, 2022 @12:11PM (#30743871)
For now, I've reduced the circle radius by 20%
Re:Show HN: A game that tests how well you know your local area by BrandoElFollito on Saturday March 19, 2022 @05:23PM (#30737691)
A geofence matching the city limits would be great
Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @05:46PM (#30737843)
Right now there's no backend but potentially I could have a leaderboard per geofenced city / town
Re:Show HN: A game that tests how well you know your local area by SECProto on Saturday March 19, 2022 @03:56PM (#30737042)
I enjoyed it! worked reasonably well for the city I tried. I did have a few nitpicks, but they are mostly datasource related as opposed to anything you can control - the several rounds i played included a pedway system, several walking trails, and a private driveway. Only change I might suggest making is the radius of the pin - getting a 99/100 for being 6m off because the pin didnt go exactly where I thought it was. Or is there any way for the pin to snap to an object?
Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @04:09PM (#30737130)
Can you give me the coordinates you played in? I will review the "objects".

I can do something with the pin too. Probably not possible to snap though, no.

Thanks!

Re:Show HN: A game that tests how well you know your local area by SECProto on Saturday March 19, 2022 @04:45PM (#30737448)
> Can you give me the coordinates you played in? I will review the "objects".

Here's the osm for the pedway object, labelled a footpath. https://www.openstreetmap.org/relation/11909462

Here's one of the trails: https://www.openstreetmap.org/way/511807176

Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @04:55PM (#30737517)
Re:Show HN: A game that tests how well you know your local area by adamlynch on Sunday March 27, 2022 @09:58AM (#30820286)
Fixed!
Re:Show HN: A game that tests how well you know your local area by nannal on Saturday March 19, 2022 @03:52PM (#30737011)
I want to chime in as well to say I felt the circle was too large, I know districts in cities vary in size a lot but, but the game covered ~6 with mine in the middle. Checking the village I grew up in also covered the edges of three towns around it and a neighboring village.
Re:Show HN: A game that tests how well you know your local area by adamlynch on Sunday March 20, 2022 @12:16PM (#30743934)
Thanks. For now, I've reduced the circle radius by 20%. I plan to make it adjustable in the future.
Re:Show HN: A game that tests how well you know your local area by kiney on Saturday March 19, 2022 @06:35PM (#30738166)
I think it would be useful to use actual boundries of villages or neighbourhoods instead of circles. Not sure how difficult that is. (the required data is in OSM, at least in germany)
Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @07:16PM (#30738429)
The data is there but it's difficult to make everyone happy. I don't have a backend but if I did, a leaderboard per town would be nice
Re:Show HN: A game that tests how well you know your local area by et-al on Saturday March 19, 2022 @07:54PM (#30738677)
I think a difference with Wordle is that we're playing different neighborhoods and different streets every day, so a "cheated" perfect score would have little meaning. And I think when people share their Wordle results, it's often a "wow, I lucked out on that guess" or "phew, almost didn't get it".

Perhaps the ability to choose the sample area could be based on the zoom level and hidden under a settings cog?

Re:Show HN: A game that tests how well you know your local area by adamlynch on Sunday March 20, 2022 @12:14PM (#30743916)
For now, I've reduced the circle radius by 20%. I plan to make it adjustable in the future.
Re:Show HN: A game that tests how well you know your local area by rockostrich on Saturday March 19, 2022 @12:39PM (#30735196)
It's also kinda silly to do streets for something like Manhattan since it's a grid. But landmarks/businesses would work really well in any city.
Re:Show HN: A game that tests how well you know your local area by bwanab on Saturday March 19, 2022 @01:50PM (#30735905)
Agreed. I live in a densely packed urban neighborhood. There’s no way I know streets that aren’t main streets more than 1/2 mile away.

Cool concept though. This would be a nice game at many geographic magnitudes.

Re:Show HN: A game that tests how well you know your local area by petschge on Saturday March 19, 2022 @12:48PM (#30735307)
In my case it covers three different villages...
Re:Show HN: A game that tests how well you know your local area by jimmaswell on Saturday March 19, 2022 @02:21PM (#30736240)
I'm only getting a blank background on Firefox, both Android and desktop.

Edge too, is the service just down?

Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @02:25PM (#30736298)
Yes but it should be back now?

My hosting provider (Cloudflare Pages) seem to have a limit on "functions" I cannot increase. I've worked around it for now but it might open at Cork for everyone. If so, you can zoom out and tap the map to select somewhere else.

Re:Show HN: A game that tests how well you know your local area by jimmaswell on Saturday March 19, 2022 @02:30PM (#30736347)
I put my town's coordinates in manually and it's still blank, and I don't see anything zooming all the way out.

What do you mean by functions? I would just request location with javascript and use Google geolocation as a fallback.

Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @03:45PM (#30736958)
OK I'm done with fighting fires for now and can answer that last question. Cloudflare offer "functions" and "workers", they're like functions that run on the edge CDN nodes.

These functions receive geolocation information via a function argument. So I've a function that intercepts requests to the app, grabs the geolocation information, and rewrites the URL (inserting the coordinates e.g. /lat,lng).

I go into more detail about this in the blog post but originally it just opened in Cork for everyone. I disliked the idea of having an annoying browser prompt for location permissions. I made it for my dad so having no geolocation was fine to begin with and I eventually added the geolocation I described above. Less friction, no extra client-side requests.

Re:Show HN: A game that tests how well you know your local area by whoopdedo on Saturday March 19, 2022 @08:14PM (#30738771)
Those "annoying prompts" are there for a reason. How do you justify ignoring the users' wishes with regards to accessing personally identifiable information?

Also, why WebGL?

Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @08:37PM (#30738883)
>Those "annoying prompts" are there for a reason

Yep, but not worth ruining the UX for marginally better geolocation in my case.

> How do you justify ignoring the users' wishes with regards to accessing personally identifiable information?

I don't know what you're referring to. If you're suggesting I'd prefer that apps & sites could access our location without asking, you're mistaken.

>Also, why WebGL?

The no-streets OSM raster map tiles were discontinued and I had to switch to custom Maptiler layers. They don't allow raster map tiles on the free plan.

Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @03:21PM (#30736803)
OK it should be more back now. I migrated from Cloudflare functions to a Cloudflare worker. Make sure to clear your cache / hard reload though
Re:Show HN: A game that tests how well you know your local area by jwagenet on Saturday March 19, 2022 @02:14PM (#30736171)
Dropping a pin close enough on mobile to get 100 points was really difficult. I probably was only able to average like 12m accuracy even though the pin appeared to be in the correct place every time.

I also did my area twice and around 6/10 were either numbered or major roads that are very easy to ID. It might make sense to deemphasize larger or longer roads and numbered roads for a better balance of true local knowledge.

Re:Show HN: A game that tests how well you know your local area by lostlogin on Saturday March 19, 2022 @04:35PM (#30737360)
Zooming right in helps, but with 100% knowledge of the answers I still got points deducted.
Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @04:14PM (#30737165)
I will fix the pin accuracy issue for sure!
Re:Show HN: A game that tests how well you know your local area by modeless on Saturday March 19, 2022 @07:34PM (#30738546)
I found the game easy in an urban area where I've lived for only three years, but impossible in the rural area where I grew up. It seems to pick main roads in urban areas but in rural areas I get random side roads and cul-de-sacs. The circle should be much bigger in rural areas because people typically drive longer distances. Most of the roads I actually used were outside the circle.
Re:Show HN: A game that tests how well you know your local area by noisefridge on Saturday March 19, 2022 @05:12PM (#30737624)
Nice and fun. Have you considered points of interest, photos from open sources like Panoramio or Creative Commons search, links to Wikipedia articles?

Sometimes I get stumped and I also want a picture to explain it

Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @05:14PM (#30737639)
Very interesting. No I haven't, thanks
Re:Show HN: A game that tests how well you know your local area by Breza on Wednesday March 30, 2022 @11:32AM (#30856569)
This is really cool! Could be a great training tool for first responders sitting around the firehouse waiting for a call. FFs/EMTs enjoy any chance to earn bragging rights over each other.
Re:Show HN: A game that tests how well you know your local area by JSoet on Monday March 21, 2022 @12:30AM (#30750283)
Fun game, great job, but sometimes the scoring seems kind of random, I would sometimes get ~80 points when placing it pretty much directly on the street, and then sometimes get 90 points when guessing and being a few blocks away...

Along with what you mentioned about having different difficulties in terms of radius, would also be fun to be able to choose the difficulty in terms of what types of streets (main streets vs side streets - e.g. only one type, or a mix, or turning down the selection of numbered streets somehow)

Re:Show HN: A game that tests how well you know your local area by darkerside on Sunday March 20, 2022 @08:47AM (#30742197)
I would suggest using intersections instead of streets. I'm not sure how it determines what segment of the street is correct, but I had some random guesses score higher than the correct street I knew but a part that wasn't highlighted in the result set.
Re:Show HN: A game that tests how well you know your local area by evil-olive on Saturday March 19, 2022 @09:16PM (#30739107)
this is an awesome idea!

only bit of feedback I have is that the street names may need some cleanup / filtering of some kind.

I picked a starting location in downtown Seattle (47.60882,-122.33087) and was told to locate "escalator"...it seems to have picked the escalator to the Pioneer Square light rail station as a "street" to be located.

Re:Show HN: A game that tests how well you know your local area by adamlynch on Sunday March 20, 2022 @08:52AM (#30742233)
I've now excluded "escalator", thanks
Re:Show HN: A game that tests how well you know your local area by mohitc on Sunday March 20, 2022 @04:39AM (#30741111)
I was asked same street twice in 5 attempts
Re:Show HN: A game that tests how well you know your local area by adamlynch on Tuesday March 22, 2022 @04:53AM (#30763990)
This is now fixed! (Thanks to a contribution by johrpan)
Re:Show HN: A game that tests how well you know your local area by adamlynch on Sunday March 20, 2022 @09:00AM (#30742273)
I will be looking into this for sure
Re:Show HN: A game that tests how well you know your local area by planetsprite on Sunday March 20, 2022 @08:58PM (#30748752)
I played once and it asked me to locate the same street 3 times in one 5 question round.
Re:Show HN: A game that tests how well you know your local area by adamlynch on Monday March 21, 2022 @11:53AM (#30755520)
Will fix this, thanks. Any further info would be helpful
Re:Show HN: A game that tests how well you know your local area by adamlynch on Tuesday March 22, 2022 @04:53AM (#30763993)
This is now fixed! (Thanks to a contribution by johrpan)
Re:Show HN: A game that tests how well you know your local area by rubyfan on Saturday March 19, 2022 @05:58PM (#30737930)
how does this get my location? I use a Cloudflare WARP+ which seems to mask my IP for most sites but this one looks like it’s using a nearby cell tower?
Re:Show HN: A game that tests how well you know your local area by adamlynch on Saturday March 19, 2022 @06:00PM (#30737938)
I don't know exactly but I use the geolocation information Cloudflare gives me in my edge function/worker. It's not 100% accurate or reliable. Your result can vary minutes apart or depending on which network you're on.