nesbox/TIC-80

GitHub: nesbox/TIC-80

TIC-80 是一款免费开源的微型「幻想计算机」,旨在为用户提供一个内置全套开发工具的受限沙盒环境,用于创建、游玩和分享复古风格的微型游戏。

Stars: 5937 | Forks: 604

[![构建状态](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/877db56e05044556.svg)](https://github.com/nesbox/TIC-80/actions?query=workflow%3ABuild) ![TIC-80](https://tic80.com/img/logo64.png) **TIC-80 微型计算机** — [tic80.com](https://tic80.com) - [关于](#about) - [特性](#features) - [二进制文件下载](#binary-downloads) - [Nightly 构建版](#nightly-builds) - [非官方 Linux/arm64 Nightly 构建版](#unofficial-builds) - [专业版](#pro-version) - [专业版特性](#pro-features) - [社区](#community) - [贡献](#contributing) - [构建说明](#build-instructions) - [Windows](#windows) - [MSVC (Microsoft Visual C++)](#msvc-microsoft-visual-c) - [Windows XP / Windows 7 32位 (x86)](#windows-xp--windows-7-32-bit-x86) - [Windows 10 / 11 64位 (x64)](#windows-10--11-64-bit-x64) - [MSYS2 / MINGW](#msys2--mingw) - [Windows 10 / 11 64位 (x64)](#windows-10--11-64-bit-x64-1) - [Linux](#linux) - [Ubuntu](#ubuntu) - [Ubuntu 22.04 (Jammy Jellyfish)](#ubuntu-2204-jammy-jellyfish) - [Ubuntu 24.04 (Noble Numbat)](#ubuntu-2404-noble-numbat) - [Arch](#arch) - [Fedora](#fedora) - [Fedora 36](#fedora-36) - [Fedora 40](#fedora-40) - [openSUSE](#opensuse) - [openSUSE Tumbleweed / Leap 16.0](#opensuse-tumbleweed--leap-160) - [Raspberry Pi](#raspberry-pi) - [Raspberry Pi OS (64-Bit) (Bookworm)](#raspberry-pi-os-64-bit-bookworm) - [Raspberry Pi (Retropie)](#raspberry-pi-retropie) - [Mac](#mac) - [FreeBSD](#freebsd) - [安装说明](#install-instructions) - [Linux](#linux-1) - [Android](#android) - [iOS / tvOS](#ios--tvos) - [致谢](#credits) # 关于 TIC-80 是一款免费开源的幻想计算机,用于制作、游玩和分享微型游戏。 借助 TIC-80,您将获得内置的开发工具:代码、精灵图、地图、声音编辑器以及命令行,这些足以创建一款微型复古游戏。 游戏被打包成一个卡带文件,可以轻松分发。TIC-80 可在所有流行的平台上运行。这意味着您的卡带可以在任何设备上游玩。 为了制作复古风格的游戏,整个创建和执行过程都在一些技术限制下进行:240x136 像素显示屏、16 色调色板、256 个 8x8 彩色精灵图、4 声道声音等。 ![TIC-80](https://user-images.githubusercontent.com/1101448/92492270-d6bcbc80-f1ea-9d2d-468ad015ace2.gif) ### 特性 - 支持多种编程语言:[Lua](https://www.lua.org)、 [Moonscript](https://moonscript.org)、 [Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)、 [Ruby](https://www.ruby-lang.org/en)、 [Wren](https://wren.io/)、 [Fennel](https://fennel-lang.org)、 [Squirrel](https://www.squirrel-lang.org)、 [Janet](https://janet-lang.org),以及 [Python](https://www.python.org)。 - 游戏支持鼠标和键盘作为输入 - 游戏最多支持 4 个手柄作为输入(每个手柄最多 8 个按键) - 内置编辑器:用于代码、精灵图、世界地图、音效和音乐 - 额外的内存 Bank:在游戏运行时从卡带中加载不同的素材 - 受管理的社区 # 二进制文件下载 ## 稳定版 您可以直接从我们的 [Releases](https://github.com/nesbox/TIC-80/releases) 页面下载主要操作系统的编译版本。 ## Nightly 构建版 可以从官方的 [nightly.link](https://nightly.link/nesbox/TIC-80/workflows/build/main) 页面或 [Github Actions](https://github.com/nesbox/TIC-80/actions?query=branch%3Amain) 页面下载。 ## 非官方构建版 Linux (arm64) 构建版可以从 _aliceisjustplaying_ 的 [nightly.link](https://nightly.link/aliceisjustplaying/TIC-80/workflows/build-linux-arm64/main?preview) 页面下载。已在 Raspberry Pi OS (64-bit) (Bookworm)、Asahi Linux (Fedora Remix)、Ubuntu 22.04 和 Fedora 40 上通过测试。 # 专业版 为了帮助支持 TIC-80 的开发,我们推出了 [专业版](https://nesbox.itch.io/tic80)。 此版本具有一些额外的功能,其二进制文件只能在我们的 itch.io 页面下载。 对于无法负担该程序费用的用户,可以使用 `cmake .. -DBUILD_PRO=On` 命令轻松地从源代码构建专业版。 ## 专业版特性 - 以文本格式保存/加载卡带,并可在您想要的任何编辑器中创建游戏,这也对版本控制系统非常有用。 - 更多的内存 Bank:不再是只有 1 个内存 Bank,而是拥有 8 个。 - 导出不含编辑器的游戏,然后将其发布到应用商店。 # 构建说明 ## Windows ### MSVC (Microsoft Visual C++) #### Windows XP / Windows 7 32位 (x86) 构建过程已在 Windows 11 64位 (x64) 上通过测试;所有这些操作也应该能在 Windows 7 SP1 32位 (x86) 上运行。本指南假定您正在使用提升权限的命令提示符。 - 安装 [Git](https://git-scm.com/download/win)、[CMake](https://cmake.org/download)、[Visual Studio 2019 Build Tools](https://winstall.app/apps/Microsoft.VisualStudio.2019.BuildTools) 和 [Ruby+Devkit 2.7.8 x86](https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.8-1/rubyinstaller-devkit-2.7.8-1-x86.exe) - 在 VS2019 中安装必要的依赖项: - 启动 "Visual Studio Installer" - 点击 "修改" - 勾选 "使用 C++ 的桌面开发" - 转到 "单个组件" - 搜索 "v141" - 安装: - C++ Windows XP Support for VS 2017 (v141) tools [Deprecated] - MSVC v141 - VS 2017 C++ x64/x86 build tools (v14.16) - 点击 "修改" - 使用选项 `1,3` 运行 `ridk install`,以设置 [MSYS2](https://www.msys2.org) 和开发工具链 - 将位于 `C:\Ruby27\msys32\mingw32\bin` 的 MSYS2 的 [`gcc`](https://gcc.gnu.org) 添加到您的 `$PATH` 中 [(指南)](https://www.java.com/en/download/help/path.html#:~:text=your%20java%20code.-,Windows%207,-From%20the%20desktop) - 打开一个新的提升权限的命令提示符并运行以下命令: ``` git clone --recursive https://github.com/nesbox/TIC-80 && cd .\TIC-80\build copy /y .\build\janet\janetconf.h .\vendor\janet\src\conf\janetconf.h cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_ALL=On .. cmake --build . --parallel ``` 您会在 `TIC-80\build\bin` 目录下找到 `tic80.exe`。 #### Windows 10 / 11 64位 (x64) 本指南假定您正在使用提升权限的 PowerShell 提示符。 - 手动或使用 [WinGet](https://github.com/microsoft/winget-cli) 安装 [Git](https://git-scm.com/download/win)、[CMake](https://cmake.org/download)、[Visual Studio 2019 Build Tools](https://winstall.app/apps/Microsoft.VisualStudio.2019.BuildTools) 和 [Ruby+Devkit 2.7.8 x64](https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.8-1/rubyinstaller-devkit-2.7.8-1-x64.exe): ``` winget install Git.Git Kitware.CMake Microsoft.VisualStudio.2019.BuildTools RubyInstallerTeam.RubyWithDevKit.2.7 ``` - 在 VS2019 中安装必要的依赖项: - 启动 "Visual Studio Installer" - 点击 "修改" - 勾选 "使用 C++ 的桌面开发" - 确保已安装以下组件: - Windows 10 SDK (10.0.19041.0) - MSVC v142 - VS 2019 C+ + x64/x86 build tools (Latest) - 点击 "修改" - 使用选项 `1,3` 运行 `ridk install`,以设置 [MSYS2](https://www.msys2.org) 和开发工具链 - [手动](https://www.java.com/en/download/help/path.html#:~:text=Mac%20OS%20X.-,Windows,-Windows%2010%20and)或使用以下 PowerShell 命令,将位于 `C:\Ruby27-x64\msys64\mingw64\bin` 的 MSYS2 的 [`gcc`](https://gcc.gnu.org) 添加到您的 `$PATH` 中: ``` [Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\Ruby27-x64\msys64\mingw64\bin', [EnvironmentVariableTarget]::Machine) ``` - 打开一个新的提升权限的提示符并运行以下命令: ``` git clone --recursive https://github.com/nesbox/TIC-80 && cd .\TIC-80\build cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=On .. cmake --build . --parallel ``` 您会在 `TIC-80\build\bin` 目录下找到 `tic80.exe`。 ### MSYS2 / MINGW #### Windows 10 / 11 64位 (x64) 本指南假定您正在使用提升权限的 PowerShell 提示符。 - 手动或使用 [WinGet](https://github.com/microsoft/winget-cli) 安装 [Git](https://git-scm.com/download/win)、[CMake](https://cmake.org/download) 和 [Ruby+Devkit 2.7.8 x64](https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.8-1/rubyinstaller-devkit-2.7.8-1-x64.exe): ``` winget install Git.Git Kitware.CMake RubyInstallerTeam.RubyWithDevKit.2.7 ``` - 使用选项 `1,3` 运行 `ridk install`,以设置 [MSYS2](https://www.msys2.org) 和开发工具链 - [手动](https://www.java.com/en/download/help/path.html#:~:text=Mac%20OS%20X.-,Windows,-Windows%2010%20and)或使用以下 PowerShell 命令,将位于 `C:\Ruby27-x64\msys64\mingw64\bin` 的 MSYS2 的 [`gcc`](https://gcc.gnu.org) 添加到您的 `$PATH` 中: ``` [Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\Ruby27-x64\msys64\mingw64\bin', [EnvironmentVariableTarget]::Machine) ``` - 打开一个新的提升权限的提示符并运行以下命令: ``` git clone --recursive https://github.com/nesbox/TIC-80 && cd .\TIC-80\build cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=On .. $numCPUs = [Environment]::ProcessorCount mingw32-make "-j$numCPUs" ``` 您会在 `TIC-80\build\bin` 目录下找到 `tic80.exe`。 ## Linux ### Ubuntu #### Ubuntu 22.04 (Jammy Jellyfish) 在终端中运行以下命令: ``` # 从 https://apt.kitware.com 安装最新版 CMake test -f /usr/share/doc/kitware-archive-keyring/copyright || wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null sudo apt-get update test -f /usr/share/doc/kitware-archive-keyring/copyright || sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg sudo apt-get install kitware-archive-keyring sudo apt update && sudo apt -y install build-essential cmake git libpipewire-0.3-dev libwayland-dev libsdl2-dev ruby-dev libglvnd-dev libglu1-mesa-dev freeglut3-dev libcurl4-openssl-dev git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=On .. && cmake --build . --parallel ``` 按照 [安装说明](#install-instructions) 进行安装 #### Ubuntu 24.04 (Noble Numbat) 在终端中运行以下命令: ``` sudo apt update && sudo apt -y install build-essential cmake git libpipewire-0.3-dev libwayland-dev libsdl2-dev ruby-dev libcurl4-openssl-dev libglvnd-dev libglu1-mesa-dev freeglut3-dev git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=On -DBUILD_STATIC=On .. && cmake --build . --parallel ``` 按照 [安装说明](#install-instructions) 进行安装 ### Arch 在终端中运行以下命令: ``` sudo pacman -S cmake ruby mesa libglvnd glu git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake -DBUILD_WITH_ALL=On .. && cmake --build . --parallel ``` 按照 [安装说明](#install-instructions) 进行安装 ### Fedora #### Fedora 36 在终端中运行以下命令: ``` sudo dnf -y groupinstall "Development Tools" "Development Libraries" sudo dnf -y install ruby rubygem-{tk{,-doc},rake,test-unit} cmake libglvnd-devel libglvnd-gles freeglut-devel clang libXext-devel SDL_sound pipewire-devel pipewire-jack-audio-connection-kit-devel pulseaudio-libs-devel git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake -DCMAKE_CXX_COMPILER=clang++ -DSDL_ALSA=On -DBUILD_WITH_ALL=On .. ``` 按照 [安装说明](#install-instructions) 进行安装 #### Fedora 40 在终端中运行以下命令: ``` sudo dnf -y groupinstall "Development Tools" "Development Libraries" sudo dnf -y install ruby-devel rubygem-rake cmake clang pipewire-devel SDL2-devel SDL2_sound-devel SDL2_gfx-devel wayland-devel libXext-devel pipewire-jack-audio-connection-kit-devel pipewire-jack-audio-connection-kit-devel pulseaudio-libs-devel rubygems-devel libdecor-devel libdrm-devel mesa-libgbm-devel esound-devel freeglut-devel cmake -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=On .. cmake --build . --parallel ``` 按照 [安装说明](#install-instructions) 进行安装 ### openSUSE #### openSUSE Tumbleweed / Leap 16.0 在终端中运行以下命令: ``` sudo zypper refresh sudo zypper install --no-confirm --type pattern devel_basis sudo zypper install --no-confirm cmake glu-devel libXext-devel pipewire-devel libcurl-devel git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=On .. && cmake --build . --parallel ``` 按照 [安装说明](#install-instructions) 进行安装 ### Raspberry Pi #### Raspberry Pi OS (64-Bit) (Bookworm) 在终端中运行以下命令: ``` sudo apt update && sudo apt -y install cmake libpipewire-0.3-dev libwayland-dev libsdl2-dev ruby-dev libcurl4-openssl-dev git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=On .. && cmake --build . --parallel 2 ``` 按照 [安装说明](#install-instructions) 进行安装 #### Raspberry Pi (Retropie) 首先,将 jessie-backports 仓库添加到您的 `/etc/apt/sources.list` `deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main` 然后在终端中运行以下命令: ``` # 所需的公钥 gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553 gpg -a --export 8B48AD6246925553 | sudo apt-key add - gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010 gpg -a --export 7638D0442B90D010 | sudo apt-key add - # 升级系统 sudo apt-get update sudo apt-get dist-upgrade # 安装软件 sudo apt-get install git build-essential ruby-full libsdl2-dev zlib1g-dev sudo apt-get install -t jessie-backports liblua5.3-dev git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake -DBUILD_WITH_ALL=On .. # 安装软件 ubuntu 22.04.3 LTS sudo apt-get install git build-essential ruby-full libsdl2-dev zlib1g-dev sudo apt-get install liblua5.3-dev sudo apt-get install libcurl4-openssl-dev git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake -DBUILD_WITH_ALL=On .. ``` 按照 [安装说明](#install-instructions) 进行安装 _注意:_ 如果您使用的是普通的 Raspberry Pi 镜像(非 Retropie),您可能没有启用 OpenGL 驱动。运行 `sudo raspi-config`,然后选择 7 进入“高级选项”,接着选择 6 进入“GL 驱动”,并启用“GL (Fake KMS) Desktop Driver”。更改此设置后,请重新启动。 ## Mac 安装 `Command Line Tools for Xcode` 和 `brew` 包管理器 在终端中运行以下命令: ``` brew install git cmake git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake -DBUILD_WITH_ALL=On -DCMAKE_POLICY_VERSION_MINIMUM=3.5 .. make -j4 ``` 为开发版本创建应用程序图标: ``` mkdir -p ~/Applications/tic80dev.app/Contents/{MacOS,Resources} cp -f macosx/tic80.plist ~/Applications/tic80dev.app/Contents/Info.plist cp -f macosx/tic80.icns ~/Applications/tic80dev.app/Contents/Resources cat > ~/Applications/tic80dev.app/Contents/MacOS/tic80 </dev/null EOF chmod +x ~/Applications/tic80dev.app/Contents/MacOS/tic80 ``` 请务必更新脚本中 tic80 二进制文件的绝对路径,或者更新启动参数。 ## FreeBSD 在终端中运行以下命令: ``` sudo pkg install gcc git cmake ruby libglvnd libglu freeglut mesa-devel mesa-dri alsa-lib git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake -DBUILD_WITH_ALL=On .. make -j4 ``` Mesa 会在错误的路径中寻找 swrast_dri.so,因此还需为其创建软链接: ``` sudo ln -s /usr/local/lib/dri/swrast_dri.so /usr/local/lib/dri-devel/ ``` # 安装说明 ## Linux - 要在不安装的情况下生成可执行文件 `./tic80`,请运行 `make`,并在 `TIC-80/build/bin` 中找到输出。 - 要进行全局安装,请运行 `sudo make install` - 如果您使用的是现代系统,可以附加 `-j4`;如果是 Raspberry Pi,可以附加 `-j2` 来加速此过程。 现在可以通过 `tic80`(如果已安装)或 `./tic80`(如果未安装)来运行 TIC-80。 ## iOS / tvOS 您可以在这里找到 iOS/tvOS 版本 - 0.60.3: https://github.com/brunophilipe/TIC-80 - 0.45.0: https://github.com/CliffsDover/TIC-80 ## Android 您可以在 [-Droid](https://f-droid.org/packages/com.nesbox.tic/) 上找到已编译完成的版本以供下载和安装: [从 F-Droid 获取](https://f-droid.org/packages/com.nesbox.tic/) ## 致谢 * Filippo Rivato — [Twitter @HomineLudens](https://twitter.com/HomineLudens) * Fred Bednarski — [Twitter @FredBednarski](https://twitter.com/FredBednarski) * Al Rado — [Twitter @alrado2](https://twitter.com/alrado2) * Trevor Martin — [Twitter @trelemar](https://twitter.com/trelemar) * MonstersGoBoom — [Twitter @MonstersGoBoom](https://twitter.com/MonstersGo) * Matheus Lessa — [Twitter @matheuslrod](https://twitter.com/matheuslrod) * CliffsDover — [Twitter @DancingBottle](https://twitter.com/DancingBottle) * Frantisek Jahoda — [GitHub @jahodfra](https://github.com/jahodfra) * Guilherme Medeiros — [GitHub @frenetic](https://github.com/frenetic) * Andrei Rudenko — [GitHub @RudenkoArts](https://github.com/RudenkoArts) * Phil Hagelberg — [@technomancy](https://technomancy.us/colophon) * Rob Loach — [Twitter @RobLoach](https://twitter.com/RobLoach) [GitHub @RobLoach](https://github.com/RobLoach) * Wade Brainerd — [GitHub @wadetb](https://github.com/wadetb) * Paul Robinson — [GitHub @paul59](https://github.com/paul59) * Stefan Devai — [GitHub @stefandevai](https://github.com/stefandevai) [Blog stefandevai.me](https://stefandevai.me) * Damien de Lemeny — [GitHub @ddelemeny](https://github.com/ddelemeny) * Adrian Siekierka — [GitHub @asiekierka](https://github.com/asiekierka) [Website](https://asie.pl/) * Jay Em (Sweetie16 palette) — [Twitter @GrafxKid](https://twitter.com/GrafxKid) * msx80 — [Twitter @msx80](https://twitter.com/msx80) [Github msx80](https://github.com/msx80) * Josh Goebel — [Twitter @dreamer3](https://twitter.com/dreamer3) [Github joshgoebel](https://github.com/joshgoebel) * Joshua Minor — [GitHub @jminor](https://github.com/jminor) * Julia Nelz — [Github @remi6397](https://github.com/remi6397) [WWW](https://nelz.pl) * Thorben Krüger — [Mastodon @benthor@chaos.social](https://chaos.social/@benthor) * David St—Hilaire — [GitHub @sthilaid](https://github.com/sthilaid) * Alec Troemel — [Github @alectroemel](https://github.com/AlecTroemel) * Kolten Pearson — [Github @koltenpearson](https://github.com/koltenpearson) * Cort Stratton — [Github @cdwfs](https://github.com/cdwfs) * Alice — [Github @aliceisjustplaying](https://github.com/aliceisjustplaying) * Sven Knebel — [Github @sknebel](https://github.com/sknebel) * Graham Bates — [Github @grahambates](https://github.com/grahambates) * Kii — [Github @kiikrindar](https://github.com/kiikrindar) * Matt Westcott — [Github @gasman](https://github.com/gasman) * NuSan — [Github @TheNuSan](https://github.com/thenusan) * Li Jin — [Github @pigpigyyy](https://github.com/pigpigyyy) * Dania Rifki — [Github @Kaleidosium](https://github.com/Kaleidosium) * Carsten Teibes — [GitHub @carstene1ns](https://github.com/carstene1ns)
标签:8位游戏, Bash脚本, CMS安全, DNS解析, Fantasy Computer, JavaScript, Lua, Python, Retro Gaming, rizin, TIC-80, 代码编辑器, 像素游戏, 地图编辑器, 复古游戏, 客户端加密, 幻想计算机, 开源项目, 微型计算机, 数据可视化, 无后门, 游戏卡带, 游戏开发引擎, 游戏模拟器, 独立游戏, 精灵图编辑器, 自制游戏, 逆向工具, 音效编辑器