Skip to content

Chapter 4: N2

N2 (N standard 2) is SiliconCraft's default high-level language. It provides functions, classes, lists, maps, scoped variables, and libraries for virtual hardware. Compile .n2 files in N2 mode; use main.n2 as a project's entrypoint.

  1. Language guide: syntax, variables, memory management, functions, classes, collections, and control flow.
  2. Library reference: console, math, graphics, audio, storage, input, and gamepads.
  3. Projects and imports: modular source, aliases, entrypoints, and compiler selection.
  4. DeviceKit peripherals: asynchronous calls, constants, strings, JSON results, and serial discovery.
  5. Networking: HTTP callbacks and routes, raw mailbox functions, sockets, TLS, WebSocket, and listeners.
  6. Create and airship peripherals: airship readings and wireless redstone control.
  7. Examples: standalone programs, an OOP project, peripherals, and networking.

Hardware setup · N standards · All chapters