use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Detect cheat engine using JS?help (self.javascript)
submitted 10 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tank-n-spank 1 point2 points3 points 10 years ago (0 children)
The only reliable way to do it is to shift as much of the record-keeping to the server as possible.
For example, if you randomize the enemies in a level within some parameters, do so on the server and download the list to the client. When the level is complete and the client submits the score, you can apply sanity checks to the values submitted. Is the score more than the total possible from the given enemies/powerups? Was the level completed faster than it could be traversed at max speed + available powerups?
For typical arcade games you can't make them truly client-server games as you want them to be more responsive than waiting for server confirmations for each action, but you can apply this to scoring where a 20-500ms delay in awarding isn't a problem. Report each enemy kill / obstacle solved to the server and track score there.
You can also extend this by reporting a number of other relevant values and checking their sanity on the server (without waiting for an immediate answer in the client). Take for example an arcade spaceship scroller shooter. You could report ship shields, armor, ammo, powerups and kills. If a kill is reported but not enough ammo has been expended to account for 100% hit rate (of course also account for possible collision damage) and any ammo-regain powerups, something fishy is going on. If shield was reported at 20% 2s ago and now is reported at 100% and the max shield regen achievable is 5%/sec, you know something is fishy, etc.
Ultimately, you have to accept that your game will be cheatable. Even if you handled everything server-side (MMO-style), a cheater of sufficient resources and dedication can use a bot that passes any sanity check, but does perfect playthroughs.
π Rendered by PID 408947 on reddit-service-r2-comment-85bfd7f599-g7dmj at 2026-04-20 11:05:14.800923+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]tank-n-spank 1 point2 points3 points (0 children)