|
| 1 | +# Project Overview: TIC-80 TINY COMPUTER |
| 2 | + |
| 3 | +TIC-80 is a free and open-source fantasy computer designed for creating, playing, and sharing small games. It provides a complete development environment with built-in tools for code, sprites, maps, sound effects, and music editing, all accessible via a command line. The project emphasizes retro-style game development by imposing technical limitations such as a 240x136 pixel display and a 16-color palette. |
| 4 | + |
| 5 | +**Key Features:** |
| 6 | +* **Multi-language Support:** Develop games using Lua, Moonscript, Javascript, Ruby, Wren, Fennel, Squirrel, Janet, and Python. |
| 7 | +* **Integrated Editors:** Built-in tools for code, sprites, world maps, sound effects, and music. |
| 8 | +* **Cartridge System:** Games are packaged into easily distributable cartridge files. |
| 9 | +* **Cross-Platform:** Works on various operating systems, allowing cartridges to be played on any device. |
| 10 | +* **Pro Version:** Offers additional features like saving/loading cartridges in text format and more memory banks. |
| 11 | + |
| 12 | +# Building and Running |
| 13 | + |
| 14 | +The project uses CMake as its primary build system. Detailed instructions for various platforms (Windows, Linux, Mac, FreeBSD) are available in the `README.md`. |
| 15 | + |
| 16 | +**General Build Steps:** |
| 17 | + |
| 18 | +1. **Clone the repository:** |
| 19 | + ```bash |
| 20 | + git clone --recursive https://github.com/nesbox/TIC-80 |
| 21 | + cd TIC-80/build |
| 22 | + ``` |
| 23 | +2. **Configure with CMake:** |
| 24 | + Run `cmake` with appropriate options for your platform and desired features. To ensure all tools (including `xplode`) are built, use the `-DBUILD_TOOLS=ON` flag. A common configuration to build with all supported scripts is: |
| 25 | + ```bash |
| 26 | + cmake -DBUILD_WITH_ALL=On -DBUILD_TOOLS=ON .. |
| 27 | + ``` |
| 28 | + For specific platforms and advanced options (e.g., `BUILD_SDLGPU=On`, `BUILD_STATIC=On`), refer to the "Build instructions" section in the `README.md`. |
| 29 | + |
| 30 | +3. **Build the project:** |
| 31 | + ```bash |
| 32 | + cmake --build . --parallel |
| 33 | + # or for Make-based systems: |
| 34 | + # make -j$(nproc) # or make -j4 for Mac/FreeBSD |
| 35 | + ``` |
| 36 | + |
| 37 | +**Running the Application:** |
| 38 | + |
| 39 | +After a successful build, the executable `tic80` will typically be found in the `build/bin` directory. |
| 40 | + |
| 41 | +* **If installed system-wide:** |
| 42 | + ```bash |
| 43 | + tic80 |
| 44 | + ``` |
| 45 | +* **From the build directory:** |
| 46 | + ```bash |
| 47 | + ./tic80 |
| 48 | + ``` |
| 49 | + |
| 50 | +# Development Conventions |
| 51 | + |
| 52 | +* **Code of Conduct:** The project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md), promoting an open and welcoming environment. |
| 53 | +* **Security Policy: ** Only the latest releases receive security updates. Vulnerabilities should be reported via a [GitHub issue](https://github.com/nesbox/TIC-80/issues/new) or directly to `[email protected]`. Refer to `SECURITY.md` for more details. |
| 54 | +* **Code Formatting:** The project uses `.clang-format` for consistent code style, based on LLVM coding standards. Key formatting rules include: |
| 55 | + * 4-space indentation. |
| 56 | + * Allman style for braces (`BreakBeforeBraces: Allman`). |
| 57 | + * `AllowShortIfStatementsOnASingleLine: true`. |
| 58 | + * `PointerAlignment: Left`. |
| 59 | + * `NamespaceIndentation: None`. |
| 60 | + * `EmptyLineBeforeAccessModifier: LogicalBlock`. |
0 commit comments