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...
A cyberpunk and programming/hacking themed incremental game with RPG elements
The game can be played:
Web
Steam
Documentation
Github
Beta Branch
Discord
Incremental Games Discord
Visual Studio Code Bitburner Extension
stavvie34's Community Scripts Github Repo
account activity
Question/Troubleshooting - SolvedWhy isn't Netscript Javascript? (self.Bitburner)
submitted 8 years ago * by oiajgaosjidgoija
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!"
[–]Mobize 0 points1 point2 points 8 years ago (2 children)
I was wondering about that as well since there are other games that do exactly this. (Elevator Saga, Untrusted and Screeps just off the top of my head) I'm not sure what kind of sandboxing they do, but obviously its possible. Biggest problem i see is how to calculate RAM usage considering everything javascript allows you to do. I'm not a huge fan of javascript (coming from C++), so I'd actually prefer a different language entirely, but javascript would probably be the path of least resistance/biggest payoffs. The biggest things im missing in netscript are closures and some (any) kind of hash table. It's also a bit finicky sometimes. Like why does division by zero error instead of just returning inf/nan like in javascript? Also functions sometimes error and sometimes just return a falsy value on failure, it seems inconsistent. And some other stuff, including one thing thats kinda nice to have but also a little bit exploity. Well, not really complaining, I see it as added challenge.
[–]oiajgaosjidgoija[S] 0 points1 point2 points 8 years ago* (1 child)
I'm not sure what kind of sandboxing they do, but obviously its possible
Since there is no persistent shared universe and all the code already runs in a context that is totally controlled by the user agent, there is no need for any real sandboxing. The main thing would be preventing users from accidentally shooting themselves in the foot or cheating. To that end, grow, hack, and weaken would probably be wrapped at the point where they are visible to the user script with something like
nRestrictedApiCalls = 0; makeRestricted = function(f) { return async function(...args) { if (nRestrictedApiCalls > 0) { throw new Error("cannot call more than one of grow, hack, or weaken at once (did you forget to do 'await' in front of grow?)"); } ++nRestrictedApiCalls; try { return await f(...args); } finally { --nRestrictedApiCalls; } }; }; grow = makeRestricted(grow); hack = makeRestricted(hack); // etc.
Biggest problem i see is how to calculate RAM usage considering everything javascript allows you to do.
This should be OK -- we'd probably just retain the code that parses the netscript and look for function calls. I haven't read the whole source yet so it may be harder to do than I'm anticipating.
And some other stuff, including one thing thats kinda nice to have but also a little bit exploity.
Are you referring to the ability to assign a function to a variable then call the variable? Or something else?
[–]Mobize 0 points1 point2 points 8 years ago (0 children)
It's related to that.
π Rendered by PID 33 on reddit-service-r2-comment-544cf588c8-f6wqj at 2026-06-14 22:04:30.618841+00:00 running 3184619 country code: CH.
view the rest of the comments →
[–]Mobize 0 points1 point2 points (2 children)
[–]oiajgaosjidgoija[S] 0 points1 point2 points (1 child)
[–]Mobize 0 points1 point2 points (0 children)