18 ms·
Gas Pump Golf
- rzzzt 5y agoThe "why are you looking at the console" message got my first name right. Spooked me for a bit!
- jstanley 5y agoI was looking at how the high score submission works, and there is some quite interesting anti-cheat here. I haven't managed to defeat it, but this is what I know so far: A score submission looks like this, in a POST body to /new-score: {"score":58.92,"placeholder":"olivia","id":"64904","logs":[{"year":1931,"price":0.17,"target":0.25,"sale":0,"id":"v5v8"},{"year":1957,"price":0.31,"target":1,"sale":0,"id":"s8x3"},{"year":1976,"price":0.59,"target":4.23,"sale":0.01,"id":"d8v2"},{"year":1992,"price":1.13,"target":10.99,"sale":0.04,"id":"z2q0o9"},{"year":2005,"price":2.3,"target":0.39,"sale":0.05,"id":"c1s2j1"},{"year":2012,"price":3.64,"target":42.24,"sale":0.08,"id":"g1j2k5"}]} I tidied up the JavaScript that runs the site with jsbeautifier[0], but it's still pretty obfuscated and hard to read. So far I have worked out that the "id" field on each of the "logs" is just the number of milliseconds you held the button down, with random letters interspersed. So if you hold the button down for 125ms, then the id might get "a1b2c5". If you mess with the logs so that the "id" fields are incorrect, then the server responds with "invalid". If you leave the logs alone and only change the main "score" value then it still responds with "ok" or "top", but it doesn't appear to actually insert the score - I suspect this is supposed to frustrate efforts at cheating. I'm not sure whether using the word "placeholder" to refer to the player's name is an unintentional bug or not. I haven't played the game sufficiently well to see if a legitimate high-scoring submission to /new-score looks different. From what I can tell from the source, if you score well enough, it creates an input box and allows you to input your own name, and this input box has "placeholder" text set. If I just randomly change "olivia" to something else then my submission gets rejected with "invalid". I haven't yet worked out where the "olivia" string in "placeholder" comes from. It's a different name every time. I also haven't yet worked out where the main "id" number comes from (64904 in the above). If I make small changes to this number then the submission still seems to be accepted, but large changes result in "invalid". I'm guessing this number is some sort of fuzzy-ish checksum on the player's name, but I haven't worked out where it comes from. There is also a page at /tally which seems to map score values to integers (mostly 1, but some not) which I also haven't worked out the purpose of. [0] https://jsbeautifier.online/ https://jsbeautifier.online/
- 0x0000000 5y agoYou don't need to modify the logs, you can modify the "score" value and submit with (valid) logs from a different score, and it will go through. However, it seems the author is removing such scores from the leaderboard. Fwiw, you are correct that the digits in "id" is the duration of milliseconds. The letters in-between are random (found this in the source). If you're able to time any of the stages right, then you can find the missing variable: rate of gas dispensing (in this game, it's 6 seconds per gallon or 0.1666 gallons per second). For example, in 1931, the price is $0.17/gallon, and they want you to dispense $0.25 worth of gas. That's as little as 1.47 (0.25/0.17) gallons, or as much as ~1.52 gallons. That means you want to hold the button for between ~8825 milliseconds and ~9175 milliseconds. If you divide that ~1.5 gallons by ~9000 milliseconds, you've found the rate, 6 seconds per gallon. To generate your log entry for 1931, you'd then have something like this: {"year":1931,"price":0.17,"target":0.25,"sale":0.25,"id":"k8j9g5l8"} To generate your log id for any given year: Target / Price * 6000 = total milliseconds to hold the button. Just put a random letter in front of each digit and you're good to go.
- vgeek 5y agoWhat if you fill the tank up and then level off to have the cents as a factor or multiple of the dollars?
- ohnoNotAgain321 5y agoNow you’re just a few steps short of Numberwang: https://en.m.wikipedia.org/wiki/That_Mitchell_and_Webb_Look#Recurring_sketches https://en.m.wikipedia.org/wiki/That_Mitchell_and_Webb_Look#...
- vgeek 5y agoIs this show better than Peep Show? I have it in my queue but haven't made an orchestrated effort to download it yet.
- fredleblanc 5y agoI think its much funnier, but also completely different. It’s a sketch show, not a narrative. But I tend to watch it the whole series every month or so. It’s fun to put on in the background. I feel like the brain surgery sketch is very close to the perfect sketch. It’s a simple joke, you can see where it’s headed before it gets there, but it’s still executed well. Anyway, worth it to me.
- vgeek 5y agoI just watched that one and it looks good enough. I was hesitant because Youtube clips aren't always representative of clip shows. Even WKUK's most popular videos don't line up with the funniest.
- iKlsR 5y agoGot the first two precisely, $0.25 and $4.23 but no way I was waiting for the $42.xx one however.
- smegsicle 5y agodefinitely needs a hold-clip feature, eg the button 'sticking' if you drag out of it? and show the current total in the title to simulate getting back in your car and peeking out at the display
- trevcanhuman 5y agoAlso it automatically pops if you have a Volvo, at least that’s what happens whenever I pump it.
- gambiting 5y agoLiterally any car should do that, the clip works based on pressure - once the tank fills up the clip should bounce back, regardless of what car you drive.
- Cerium 5y agoI think trevcanhuman is saying that the clip does not work well with his car. I had a '99 Camry that became a real bear to fill up around 2019 with the newest pumps.
- trevcanhuman 5y agoIndeed, you are correct. It is a Volvo S60, 2016 or 2015 I think. So this shouldn’t be a problem, yet, it is. Even if you’re pushing it with your own finger, it pops out less than half of the tank full. Pretty weird. Does this at every gas station I think.
- weare138 5y agoThat's where I bailed too.
- nfgrep 5y agoFeels alot more like curling than golf, but "Gas Pump Curling" doesn't have quite the same ring to it.
- Nbox9 5y agoI think it’s called golf because the objective is to have the lowest score.
- KMnO4 5y agoWhat’s the objective here? It’s like a much slower reflex game with more waiting. One thing that real gas pumps have is variable flow control. Once you get to the last 10 cents you can ease up on handle and gas will trickle in at a much slower rate. Also, if you stop a few cents short you can “pulse” it a couple times.
- tills13 5y agoThe objective is to have a little fun.
- klyrs 5y agoEmphasis on little, I think. IRL, I shoot for an exact number of liters, not an exact number of dollars.
- djrogers 5y ago> Emphasis on little, I think. You must be fun at parties. > I shoot for an exact number of liters Checks out.
- tills13 5y agoHonestly, no offense, but the number of comments like this in this thread show just how disconnected from reality this site and its users can be.
- klyrs 5y agoNo offense taken! And to the sibling, no, I'm not much fun at parties! I've been known to sit in a corner with a furrowed brow pondering a mathematical puzzle that nobody cares to hear about. I'm quite accustomed to being "other" wherever I bother to appear, and I tend to work on abstractions far removed from what people consider "reality", and, indeed, I find like minds here at HN. But I guess we've got an invasion of the normies today, who think that making fun of nerds is cool like it's the 80s again. Been there, survived it, let's move on. But, you've got my curiosity... what deep truth about "reality" is exposed by Gas Pump Golf?
- aqme28 5y agoLooking at the scores, I'm surprised no one made a little javascript bot to automate it.
- ReactiveJelly 5y agorockbruno sent a bogus score through the API directly now
- greggturkington 5y ago
- Hamuko 5y agoThis game is not terribly fun.
- readthenotes1 5y agoWhat would be even less fun in many places is to do the same thing with the cost of having someone else pump the gas for you.
- ani-ani 5y agoCongratulations, your "review" is now apparently on the game's landing page. I'm sure it will drive up conversion like nothing else.
- larrybud 5y agoNot allowed to play this as I live in NJ. :)
- mixologic 5y agoSame. In OR.
- davidw 5y agoIf they got the dates just right, I think the legalized it for a little bit during the pandemic. Also, you can pump your own gas in certain rural areas now.
- seattle_spring 5y agoI'll come play it for you, for $15 an hour.
- kingcharles 5y agoPlus tips.
- seattle_spring 5y agoYou definitely aren't expected to tip pump employees in Oregon. ... but yeah, $15 plus tips for this game B)
- karaterobot 5y agoWait, really? I'm in WA, and I tip every time I go through there. I asked the first time whether it was appropriate to tip, and the guy was like "uhh, yeah!" so I've never asked again.
- gcheong 5y agoI’m sure it was much appreciated but it’s never expected.
- kwhitefoot 5y agoNot very similar to the way people really fill a tank.
- brk 5y agoHow so? I often fill my tank much like this, making note of the current year and the precise amount of cash I have on hand. It might be a regional thing, but I felt it was very realistic.
- _ea1k 5y agoNot today, but in the past it was fairly common due to the use of cash. Of course, restarting to get that last cent was common too.
- throw6622 5y agoIf the creator is reading, consider adding “user-select: none;” to the button. On iOS when you hold on it it tries to select the text.
- Rygian 5y agoUnrelated: how can I disable, browser-wide, the ability for sites to set 'user-select: none'?
- krsdcbl 5y agoyou could add a css snippet for `* { user-select: all ! important }` to override any occurrences of that property
- smegsicle 5y agounless the site already did that, so you'll have to out-override them by applying an id to the outer html tag and doing the ol' #useroverride#useroverride#useroverride#useroverride#useroverride#useroverride#useroverride#useroverride#useroverride#useroverride#useroverride#useroverride * {user-select: all !important] or whatever
- pineconewarrior 5y agoHowever if the style is inlined to the element and given an !important, you're SOL.
- invalidusernam3 5y agoJavaScript
- pbhjpbhj 5y agoSurely the cascade means that the user applied style with the same 'score' takes preference?
- 5y ago
- rockbruno 5y agoSorry, but I couldn't resist checking out the APIs and sending a fake score ("sorry"). Make sure to delete it!
- jaywalk 5y agoGas Pump Golf 2.0 is going to come with an anti-cheat rootkit now. Thanks a lot.
- rockbruno 5y agoNone of this would have happened in web3! /s
- ksaua 5y agoThanks yourself. I laughed out loud reading your comment and must've used at least 10min trying to explain to my non techie wife why an anti-cheat rootkit was so funny. She did not see the humour.
- weare138 5y agoEA Gas Pump Golf 2022 New 'Diesel' DLC is now available for $29.99
- kingcharles 5y agoThis is why we can't have nice things! (CPUs without Microsoft on the die)
- hadem 5y agoIs this why I can't get last place? :-) I wanted to see how many "levels" there were so I started to click the button repeatedly just to end the game. Then I noticed the "you did better than X%" message. I can't get first but can I get last!? Even using keyboard events, it still says I'm better than 1%. Either someone is still...more wrong/faster...or 1% is the lowest it can go? Haha!
- ry4nolson 5y ago
- djyaz1200 5y ago
- antholeole 5y agoInteresting! What a pivot - from Gas Pump Golf to Instagram for $1B /s
- hwers 5y agois BI paying for HN adbots now? or is this an attempt by the bot to engage normally so it won't trigger flags when it serves its real purpose?
- andrewflnr 5y agoWeird, 938 karma and their comment history looks legit before this one. Account compromised, maybe? Ed: more likely just meant for a different article where it was on-topic.
- sixothree 5y agoDuring high school in the 80's I had a car that I had not yet realized was leaking gas slowly. Of course, I did run out of gas on my way home from work. Of course, I didn't have my wallet. I guess since it was the late 80's, instead of calling someone for help I just asked a stranger for $0.25 to use the phone. I went inside and prepaid $0.25 worth of gas - about 1/4 gallon at the time. The cashier didn't even flinch. I literally pumped it into a plastic bottle I found, walked to my car and gassed it up. I made it home and grabbed my wallet and decided to see if it had enough gas to make it to the gas station. It did. All better.
- ultra_nick 5y agoOh, I play this game on my watch when my phone dies.
- dragontamer 5y agoIn the real world... you're normally allowed to fill more gas into the tank if you're under, while going over is a problem. I do realize this changes the nature of the game, but maybe a better description of the rules is in order here? I released 2 or 3 cents early so that I can "top off", but this apparently isn't allowed.
- sneak 5y agoI believe this is a simulation of the real-world non-top-off one try game.
- Tade0 5y agoI just imagined I had this much in my pocket and the awkwardness that would ensue should I misspump. Takes me back to my first years of driving.
- dragontamer 5y agoMost pumps I've been to are "cash first". If you give $20 to the counter, the pump shuts off exactly at $20.
- frosted-flakes 5y agoNot in Canada. Some pumps are pre-pay, particularly in bigger cities like Toronto where fill-n-fly is more of an issue, but usually you can just start pumping, then go inside to pay after. Most pump handles still have the trigger locks, too, so you can wash your windshield while it pumps.
- bee_rider 5y agoI wonder if those are more recent. It would be funny if they changed it up in the game, since it does give you years explicitly. Like, Initially they could simulate pump-then-pay. Then a brief time of pay-then-pump. Then essentially pump-then-pay as it switches over to debit card. Finally, pump-then-pay with a random chance of a massive score penalty, to simulate the modern "maybe my card got skimmed" gas pumping experience.
- notjustanymike 5y ago> It is 2005 and you have $0.39 Scary accurate.
- Nbox9 5y agoI have 100% seen people use all of the change that they had on them for gas before in an attempt to make it to their nearby destination.
- marcosdumay 5y agoThe reviews are much better than the game.
- saco 5y agoI feel like most people in this thread aren't understanding thoroughly that this game is telling you all that money is worth less every year incrementally, I wonder how long this can go on.
- zelag 5y agoIs that supposed to be something deep?
- karaterobot 5y agoInflation is hard to stop, and you probably wouldn't want to. Meanwhile, they aren't making more crude oil. So, it's definitely going to be more money for less gas as time passes. On the other hand, if they made a game where you held down a button to buy a certain amount of teraflops, it would probably go the opposite direction over time!
- carnitine 5y agoForever hopefully. Inflation is good and indicative of a healthy economy.
- amelius 5y agoJoules/gallon is also increasing. Your mileage may vary, though.
- deleted 5y ago[deleted]
- yupper32 5y agoThis is why we can't have nice things. Are people really criticizing the realism of someone's hobby project game? Really, you want better documentation or it to work perfectly on mobile browsers? You immediately need to hack the API? It's a short little game. Enjoy it for what it is.
- mynameisvlad 5y ago+1, honestly. Projects don't need to be revolutionary and ground-breaking. Especially when it's not your (general you, not you specifically) time or money on the line, who are you to criticize what someone spends their free time building?
- deleted 5y ago[deleted]
- MauranKilom 5y ago> You immediately need to hack the API? May I remind you of the name of this forum?
- cortesoft 5y agoThis makes me think of the old American Express commercial with Jerry Seinfeld and “the perfect pump”: https://youtu.be/m3JVr5HoeoA https://youtu.be/m3JVr5HoeoA For some reason I always think of this commercial when I am pumping gas, and how outdated it is. I feel like most people pay using a card now, and those that don’t usually have to pre-pay now, so the gas would shut off when they hit their amount anyway. I do remember trying to hit round numbers pumping gas when I was younger, though.
- honkdaddy 5y agoWhat a great commercial, thanks for sharing.
- MBCook 5y agoI’ve tried it a few times even though I’m paying with a credit card just to see if I could do it. And entirely because of that commercial. Never did. But after trying to hit $20 I’d just go back to letting it fill my tank.
- js2 5y agoI still say "release the hounds" whenever I start pumping. :-) Years ago—late nineties—long after almost all pumps had CC readers in them, at least in Miami where I lived at the time, and those that didn't were at least electronically connected to the attendant booth, I pulled off at a station in rural Georgia. Old-style pumps with a mechanical display. You didn't have to pay first. I filled my tank, then went inside to pay. The attendant asked me how much I'd pumped. I hadn't thought to remember the amount. I said something like "oh, let me go check for you." He replies "no need", then pulls out a pair of binoculars and reads the amount off the pump. Recently, I get annoyed by a pump in NY that wouldn't accept any of my cards or my iPhone. It made me miss those days of mechanical pumps.
- jcrawfordor 5y agoIt's amazingly rare to find gas stations that don't require prepay these days... but about three months ago I pulled off at a rural gas station, pretty remote area but two fairly new electronic pumps. The pumps seemed like they nominally accepted cards but the reader was taped over like a temporary problem, so I walked inside and put a bill on the counter and told them to put it on number one like you do... The clerk gave me a look like he had no idea what I was doing. Told me to go back outside and pump gas first so there was something to pay for (I think "so there's something to pay for" were his exact words). I can only assume this is a joke he plays on out-of-towners. Either that or some kind of temporal anomaly has happened and I bought gas in the '90s. For how commodity gas is it's kind of surprising the number of strange gas station stories I've accumulated over years in the rural southwest, but I suppose that's exactly why. A lot of towns have a gas station because they're a long ways from the next one, not because they actually have a lot of business. The consolidation of gas stations into the modern four-pump-plus with convenience store lead to a lot of older one-pump stations closing, but the ones that held on got stranger. So you end up with oddities like a restaurant that runs a couple pumps in the parking lot on the side, so paying cash requires flagging down a waiter (this was, if memory serves, actually on the outskirts of Silver City and so not even really that remote by regional standards).
- pugworthy 5y agoThis clearly could be a mini-game inside of Desert Bus
- Johnie 5y ago1. Find some gas merchants wanting to drive traffic to their stations 2. Hook this up to Plaid and to let people compete using their credit cards to be first to hit the number at the pump. 3. Profit! -- Edit: Heck, skip #1 and just sell ads on the site.
- annoyingnoob 5y agoHow long do you expect people to hold down the button while doing nothing/waiting? Real pumps have a lock and auto-off on backflow.
- spoonjim 5y agoIn high school I used to be able to nail "the perfect pump" every single time. It was a party trick when we were out and up to no good. Now of course it's completely impossible with the price of gas.
- aghilmort 5y agolove this! would be super cool if replicated the click & release we used to do as tank gets closer to fill up (or on touch devices sense pressure player applying)
- glued 5y agomutation observer for perfect score https://gist.github.com/glued/683fbfb663a9199d03da4adac4b80d99 https://gist.github.com/glued/683fbfb663a9199d03da4adac4b80d...
- jkbkbjb 5y ago
- jkbkbjb 5y ago
- jkbkbjb 5y ago
- jkbkbjb 5y ago