-
Notifications
You must be signed in to change notification settings - Fork 15
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.
- Part I. Fundamental Overview of BASIC8, explains what it is and what it's not.
-
Getting started
- Operations Some generic shortcut keys.
- Specifications Technical specifications of the fictional computer.
- Disk library
- Configuration
- Sharing
-
Getting started
- 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
- Variable and data types Read this before writing code.
-
Comment Supports single-line comment by
REM
and'
, and multi-line comment by'[
/']
. - Arithmetic and relational operations With intuitive maths notations and words.
- Bitwise operations
- String operations Read this, "String functions" (in the "Basic function") and "Text" (in the "Libraries") for all string manipulations in BASIC8.
-
Array Supports either
real
orstring
as element type, consider usinglist
ordict
to collect complex data types.
- 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
anddict
, 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).
-
Collections Including
-
Generic functions Remember
PRINT
for debugging, clickWindow
,Output
to see its output.
-
Basic principles
- 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.
-
Graphics How to make something visible.
- 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 toint
, trigonometric functions, etc. - String functions Basic BASIC string functions. See "Text" in the "Libraries" for advanced ones.
-
Data transfer and persistence
DATA
,READ
andRESTORE
are supported. NoticePERSIST
, which is easy to save/load game progress within one or two lines of code.
-
Math functions How to trim a
-
Libraries Which makes BASIC8 more than only about gaming.
-
Algorithm Built-in algorithms.
-
Pathfinding An
A-star
algorithm.
-
Pathfinding An
- 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.
-
Algorithm Built-in algorithms.
-
Basic functions
- 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".
- Links
- Guides
- References
- Built-in examples
- Gist