Skip to content

Meta manual

Wang Renxin edited this page Jan 8, 2019 · 5 revisions

The manual is the overall technical reference of BASIC8. But it might be hard to read over screens of text. This page is the manual of the manual, explains what are in parts. Could help to find out where to start with from a specific aspect.

Table of content from the manual

  • Part I. Fundamental Overview of BASIC8, explains what it is and what it's not.
  • Part II. Syntax About how the language is, recommended to read through quickly while first using. Do not need to remember all of them, you'll be familiar with it after using it for a while.
    • Basic principles
    • Control structures Won't take you long if you already know how to program, to learn the similarities and differences with other languages. Read this if you are new to programming, just ignore whatever you couldn't understand, and come back to it when you feel like you need it.
    • Advanced syntax
      • Collections Including list and dict, which can store most data types in BASIC8.
      • Sub routine A.k.a. "function", always helps to sort out parts in longer programs, although it's possible to write plain code.
      • Lambda Not required to make something. Ignore this if you are new to programming, and couldn't understand it well for the moment. But it's a common to see concept in modern programming.
      • Class Not required to make something. Ignore this if you are new to programming, and couldn't understand it well for the moment.
      • Typing Variables don't have type, but values do in BASIC8.
      • Importing another file Won't be difficult to understand, helps to separate your program into files.
      • Coroutine Not required to make something. Ignore this if you are new to programming, and couldn't understand it well for the moment. But it's a powerful weapon.
      • Automatic memory management Consider to set unused variables to nil, if it's holding referenced data types (eg. sprite, map, most data types in the "Libraries" section, etc).
    • Generic functions Remember PRINT for debugging, click Window, Output to see its output.
  • Part III. Game driver How to make your program interactive and, how a user of your program interacts with it. The minimum knowledge to make something playable.
    • Graphics How to make something visible.
      • Primitives
      • Sprite With multiple frames. Often used for characters, enemies, maybe some effects, etc.
      • Map With up to 4 layers. Often used for backgrounds, foregrounds, maybe lookup tables, etc.
      • Quantized Image with single frame, palette indexed. Often used for static backgrounds, etc. Can be imported from bmp, png, etc. in the editor
    • Input How to acquire user input from devices.
    • Audio How to make some sound.
  • Part IV. Functions Utilities, do not need to remember them. Pick up proper ones if anything can't be solved with the language itself or game driver.
    • Basic functions
      • Math functions How to trim a real number to int, trigonometric functions, etc.
      • String functions Basic BASIC string functions. See "Text" in the "Libraries" for advanced ones.
      • Data transfer and persistence DATA, READ and RESTORE are supported. Notice PERSIST, which is easy to save/load game progress within one or two lines of code.
    • Libraries Which makes BASIC8 more than only about gaming.
      • Algorithm Built-in algorithms.
      • Archive To zip/unzip.
      • Bytes Binary buffer.
      • Database SQL.
      • Date time
      • File To read/write files.
      • GUI To popup something.
      • Image Could be used to bring your own tools or something.
      • IO File information, directory information. Borrowed from DotNET.
      • JSON Who needs XML?
      • Math Few more functions.
        • Vector and matrix Value typed rather than referenced typed. You don't need to invent it again.
      • Network Either as server or client, via TCP or UDP.
      • System Some platform dependent.
      • Text More useful string functions.
      • Web Yes.
  • Part V. Editors How you interact with the built-in editors. Only read this once you need to, otherwise ignore it.
  • Part VI. Appendix We often ignore this part of a manual, but notice not to use the "Reserved words".