Reusable & Globally Accessible Code Snippets


#1

The idea behind reusable code snippets is to teach the concept of reusing code, which is both good practice and convenient. It would be fairly simple: allow registered users to save snippets of code they have created, and make them accessible in any other project using a simple UI. In my opinion, this becomes most useful after users have learned functions, as they can save a function they’ve created (such as collectCoins, which you currently have to rewrite many times in the mountain levels) and then import them in later levels. It becomes extremely tedious having to write the exact same function over and over again.


Personal library?
#2

I agree, it would be a cool feature. That being said, it can currently be accomplished by cut-and-paste techniques, so I suspect it will be a low priority…


#3

There are pretty easy workarounds as long as there is no such feature in the game:

  • store them on your computer
  • store them online (e.g. at pastebin.com or github)

#4

This ties in with a similar re-quest on another thread by @sotonin [Name suggested: code repository]. My suggested name was ‘CODEBOOK’ (in the same thread).

Such a feature builtin with the game eases the access for such info/functions. Plus, just log in from any computer/device and the login takes care of all the stored codes. Thus avoiding need to open other tab/equivalent. Perhaps we will get it in time… this is a rapidly developing game after all.