×
Create a new article
Write your page title here:
We currently have 276 articles on Waste Of Space Wiki. Type your article name above or create one of the articles listed here!



    Waste Of Space Wiki
    Revision as of 16:25, 30 May 2024 by Axenori (talk | contribs) (mostly wording)

    Waste Of Space features a fully fleshed out programming system, allowing players to program Microcontrollers using a sandboxed subset of luau (which is itself a superset of lua) called Pilot.lua. Programming allows players to easily and efficiently implement complex logic and automation into their builds by writing code.


    This article serves as an introduction to programming in-game. It provides a handy yet detailed tutorial to get you started, a list of commonplace and useful programming-related parts to consider, some useful resources to help you with programming successfully, and at the end; a few inspiring examples. The talk page of this article hosts a community board to share useful and unique projects/code.

    Tutorial

    Foreword

    Microcontrollers are perhaps one of the most powerful tools waste of space provides you with. Knowing how to use them is paramount if you want to implement any kind of advanced automation or autonomy into your builds. This is not to say they are only for drones and factories, however. Programming expands your already large range of possibilities to a nearly boundless one.

    This tutorial will provide you with a brief guide on programming and coding in-game. Namely; programming and coding are not the same, though they are often confused as such. Coding is just writing instructions to the computer (code), while programming is the engineering of software. A programmer creates algorithms and solves problems, and then codes them to create a fully-fledged software solution.

    Please do not feel intimidated by this, as if it something out of reach to you. Though serious programming is not everyone's cup of tea, you do not need to be an AAA++ software engineer with 15 years of experience to code up your little idea. Everyone needs to start somewhere, and Waste of Space is hardly a source of difficult problems. Perhaps, if after reading this tutorial you find out that you like programming, you may even become one of those pros one day. Even in the worst case though, you will have learned an increasingly relevant skill and will have developed your logical thinking. If you haven't already gotten the gist, this guide is aimed at newcomers to programming.

    If you aren't sure whether or not to commit to learning programming, perhaps a well-known example (it's on the game's thumbnail!) of programming in waste of space can tip you over to either side.

    A video of the space arcade by iiMurpyh

    Learning to code

    While you may be tempted to start writing code right away you'll need to set up an environment for this first. This is what's called a development environment.

    As you'll just be writing some basic lua throughout this tutorial, this will consist of just a text editor (and something to run your code with). A text editor can be as simple as just a notepad program so you have somewhere to jot down your code, or can be more complex and specialized for writing code. These types of text editors (code editors) often offer useful features such as automatic code completion and syntax highlighting (it colour-codes smaller bits of code, conveying their meaning or data type). A few suggestions for a code editor are listed below, complete with pros, cons, images, and links.

    • (the list)


    Once you've set up a code editor, there's one more thing to do before you can start coding: setting up a runtime environment. As lua is a scripting language - a programming language in which the instructions to the computer are stored as source code (the code as you wrote it, in textual format) - it must be translated to the computer in real time because computers can only understand binary (0s and 1s). This is what a runtime environment is for (in this case); it allows for the execution of scripts (source code) by translating them to machine code (instructions understandable to the computer) on the go.

    - Runtime env. instructions - roblox studio

    - Testing if everything works with print statements (Hello world!)

    - Use this as an introduction to basic code flow

    - variables, global vs local

    - types

    - numerical operators, numerical operators on variables

    - logical operators, scope

    - tables, dictionaries

    - loops - basic

    - strings - basic operations

    - more operators, operator shenanigans

    - functions (basic. just an introduction;)


    - tasks should be included for each of these. these tasks should be quizzed (use the quiz extension).

    Computational thinking

    - problems, and how they are broken down into programmable steps. just a lot of problems. practice makes perfect

    - small project at the end

    Coding revisited

    - strings 2

    - basic OOP

    - functions/methods 2 (stuff like recursion goes here)

    - more complex collections (stacks, queues, etc. - with implementation details/a preprogrammed script available for these)

    - built in functions (if possible in any way this should be introduced bit by bit through earlier sections)

    - coroutines

    - error handling


    - quizzes after every smaller chunk. more than for learning to code as this is tougher.

    The Microcontroller

    - parts

    - built in microcontroller functions

    - JSON and modems; web requests

    - add a quick little quiz and small project at the end

    Programming at last

    - everything put together and tested with practical projects

    - thorough explanations and solutions should be given for each project. throw in some software engineering stuff here as well.

    Afterword

    - buh bye

    Parts

    Resources

    Examples

    A flappy bird arcade machine, made by iiMurp
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.

    Recent changes

  • Axenori • 1 day ago
  • Voivsone • 1 day ago
  • Axenori • 2 days ago
  • Axenori • 3 days ago
  • Cookies help us deliver our services. By using our services, you agree to our use of cookies.