CraftOS-PC

CraftOS-PC


Modern ComputerCraft emulator


FreeOffers In-App Purchases

v2.8.1for iPhone, iPad and more
9.9
7 Ratings
Jack Bruienne
Developer
11.6 MB
Size
Mar 14, 2024
Update Date
Developer Tools
Category
4+
Age Rating
Age Rating
4+
Apps in this category do not contain restricted content.
9+
Apps in this category may contain mild or occasional cartoon, fantasy or real-life violence, as well as occasional or mild adult, sexually suggestive or horrifying content and may not be suitable for children under 9 years of age.
12+
Apps in this category may contain occasional mild indecent language, frequent or intense cartoon or real-life violence, minor or occasional adult or sexually suggestive material, and simulated gambling, and may be for children under 12 years of age.
17+
You must be at least 17 years old to access this App.
Apps in this category may contain frequent and intense offensive language; Frequent and intense cartoon, fantasy or realistic violence: frequent and intense adult, scary and sexually suggestive subjects: as well as sexual content, nudity, tobacco, alcohol and drugs, may not be suitable for children under 17 years of age.
CraftOS-PC Screenshots
CraftOS-PC posterCraftOS-PC posterCraftOS-PC posterCraftOS-PC posterCraftOS-PC poster
CraftOS-PC posterCraftOS-PC posterCraftOS-PC posterCraftOS-PC posterCraftOS-PC poster

About CraftOS-PC

CraftOS-PC is a fantasy terminal that allows you to write and run programs inside an ‘80s-style text console.

CraftOS-PC emulates the popular Minecraft mod "ComputerCraft", which adds programmable computers to Minecraft using the Lua programming language. CraftOS-PC takes this experience outside Minecraft to allow you to run the same programs anywhere you go.

CraftOS-PC provides a set of functions (called APIs) that make it super easy to do simple tasks such as write text to the screen, read files, and more. The simplicity of these functions makes CraftOS-PC great for new programmers, but their power makes it possible to write all sorts of complex programs with less code.

If you aren’t ready to write programs yet, there’s already a large number of programs for ComputerCraft that will work in CraftOS-PC, ranging from simple games to whole graphical operating systems. These can be downloaded through the built-in Pastebin and GitHub Gist clients.

• Full Lua 5.2+ scripting environment and command-line REPL
• 16-color text-based terminal display
• Expansive virtual filesystem for program and data storage
• Built-in shell with syntax similar to most desktop shells
• APIs to easily access terminal, filesystem, Internet, event queue, and more
• Built-in programs make it easy to navigate & edit files without a single line of code
• Plenty of help documents to assist programmers
• Compatibility with thousands of existing ComputerCraft programs
• Over 3x faster than Minecraft mod and comparable emulators
• Emulation of all peripherals available in ComputerCraft
• Easily access configuration from inside CraftOS
• Exclusive graphics mode providing up to 256-color, pixel-based screen manipulation
• Edit Lua scripts from CraftOS or other code editing apps
• Open-source app makes it easy to suggest and contribute changes

Documentation on all of the APIs that ComputerCraft provides are available at https://tweaked.cc, and CraftOS-PC’s unique APIs are described at https://www.craftos-pc.cc/docs/.

Join the CraftOS-PC community at https://www.craftos-pc.cc/discord!
Show More

What's New in the Latest Version v2.8.1

Last updated on Mar 14, 2024
Old Versions
Happy new year! This release of CraftOS-PC finally brings Lua 5.2 support along with compatibility with CC: Tweaked 1.109.3. In addition, it adds a new WebSocket server API, and lots and lots of critical crash fixes.

This version is a breaking release. Notably, all files are now handled in binary mode, which may break programs that have embedded UTF-8 characters (this was always discouraged for this reason). In addition, bytecode dumping and loading is disabled in standards mode, but it remains enabled when standards mode is disabled. However, despite the introduction of the goto keyword, it remains a valid identifier, so programs with variables or functions named goto should continue to function.

• Updated CC:T version to 1.109.3
• Update to Lua 5.2
• getfenv/setfenv now only work on Lua functions.
• Add support for goto.
• Remove support for dumping and loading binary chunks.
• Only disabled in standards mode
• File handles, HTTP requests and websocket messages now use raw bytes rather than converting to UTF-8.
• fs.open now supports r+/w+ modes.
• Add allow_repetitions option to textutils.serialiseJSON.
• math.random now uses Lua 5.4's random number generator.
• tostring now correctly obeys __name.
• Rewrote WebSocket server API (#337)
• Use server = http.websocketServer(port) to create a server handle
• server.listen() waits for a new connection, and returns a new WebSocket handle
• Handles have an additional clientID field for identifying the client connection
• server.close() closes the server
• Events are now under the websocket_server_ domain
• WebSocket close events now send the close code if available
• Fixed WebSocket ping messages causing the socket to close
• Fixed many memory corruption issues around ropes
• Fixed some issues with debug hooks and yielding
• Fixed crash when erroring from a debug hook (#326)
• Debuggers now inherit the mount list from the original computer (#327)
• Fixed memory reporting when using string.rep (#328)
• Fixed fs.getFreeSpace not checking parent directories if the path doesn't exist (#330)
• Fixed crash when using HTTP in the VS Code extension (#332)
• Fixed repeated websocket.close calls causing a crash (#336)
• xpcall error handlers can now yield
• Added onboarding screen for navigation bar instructions
Show More
Version History
v2.8.1
Mar 14, 2024
Happy new year! This release of CraftOS-PC finally brings Lua 5.2 support along with compatibility with CC: Tweaked 1.109.3. In addition, it adds a new WebSocket server API, and lots and lots of critical crash fixes.

This version is a breaking release. Notably, all files are now handled in binary mode, which may break programs that have embedded UTF-8 characters (this was always discouraged for this reason). In addition, bytecode dumping and loading is disabled in standards mode, but it remains enabled when standards mode is disabled. However, despite the introduction of the goto keyword, it remains a valid identifier, so programs with variables or functions named goto should continue to function.

• Updated CC:T version to 1.109.3
• Update to Lua 5.2
• getfenv/setfenv now only work on Lua functions.
• Add support for goto.
• Remove support for dumping and loading binary chunks.
• Only disabled in standards mode
• File handles, HTTP requests and websocket messages now use raw bytes rather than converting to UTF-8.
• fs.open now supports r+/w+ modes.
• Add allow_repetitions option to textutils.serialiseJSON.
• math.random now uses Lua 5.4's random number generator.
• tostring now correctly obeys __name.
• Rewrote WebSocket server API (#337)
• Use server = http.websocketServer(port) to create a server handle
• server.listen() waits for a new connection, and returns a new WebSocket handle
• Handles have an additional clientID field for identifying the client connection
• server.close() closes the server
• Events are now under the websocket_server_ domain
• WebSocket close events now send the close code if available
• Fixed WebSocket ping messages causing the socket to close
• Fixed many memory corruption issues around ropes
• Fixed some issues with debug hooks and yielding
• Fixed crash when erroring from a debug hook (#326)
• Debuggers now inherit the mount list from the original computer (#327)
• Fixed memory reporting when using string.rep (#328)
• Fixed fs.getFreeSpace not checking parent directories if the path doesn't exist (#330)
• Fixed crash when using HTTP in the VS Code extension (#332)
• Fixed repeated websocket.close calls causing a crash (#336)
• xpcall error handlers can now yield
• Added onboarding screen for navigation bar instructions
v2.7.5
Aug 8, 2023
CraftOS-PC v2.7.5 is a minor update that includes some new CC:Tweaked features, as well as some small fixes, plus a new in-app purchase for bonus plugins.

• Added plugin support on iOS through in-app purchases
° Use the `plugins` program to buy new plugin packs
° Only one is available at the moment, featuring `ccemux`, `joystick`, and `sound`
• Updated CC:T version to 1.106.1
° The shell now supports hashbangs (`#!`) (emmachase).
° Error messages in edit are now displayed in red on advanced computers.
° Improvements to the display of errors in the shell and REPL.
° Fix `rednet` queueing the wrong message when sending a message to the current computer.
° Fix the Lua VM crashing when a `__len` metamethod yields.
° `table` methods and `ipairs` now use metamethods.
° Argument errors now follow the standard "X expected, got Y" format.
° Add `coroutine.isyieldable`.
° Type errors now use the `__name` metatag.
° `xpcall` now accepts arguments after the error function.
° `speaker` program now reports an error on common unsupported audio formats.
° multishell now hides the implementation details of its terminal redirect from programs.
° `settings.load` now ignores malformed values created by editing the .settings file by hand.
° Ignore metatables in `textutils.serialize`.
° Fix `gps.locate` returning `nan` when receiving a duplicate location (Wojbie).
° Optimise JSON string parsing.
° Add `colors.fromBlit` (Erb3).
° Add custom timeout support to the HTTP API.
° The speaker program now errors when playing HTML files.
° `edit` now shows an error message when editing read-only files.
° Port `fs.find` to Lua. This also allows using `?` as a wildcard.
° Add option to serialize Unicode strings to JSON (MCJack123).
° Small optimisations to the `window` API.
° Lua REPL no longer accepts `)(` as a valid expression.
° Fix several inconsistencies with `require`/`package.path` in the Lua REPL (Wojbie).
• Added `term.relativeMouse` function, which converts `mouse_move` events into `mouse_move_relative` events with relative velocities
• Native `load` now uses Lua 5.2 syntax, matching Cobalt's behavior
• Fixed crashing when calling `monitor.blit` when the cursor is off-screen
• Fixed `modem.getNameLocal` not existing
• Fixed abort timeouts firing after the computer goes into sleep mode
• Fixed stack corruption when using `string.format("%q")`
• Fixed a niche case crash when the computer turns off while prompting for abort timeout

If you need help using CraftOS-PC, I'm available on the CraftOS-PC Discord server (https://www.craftos-pc.cc/discord) as @jackmacwindows. Feel free to ping me if you need anything.
v2.7.3
Feb 21, 2023
It's been a while since the last update! CraftOS-PC v2.7.3 brings a large number of fixes (which have been waiting for too long...), as well as a few goodies for Linux and mobile users.

• Updated CC:T version to 1.102.2
• Moved Lua portions of `fs` and `http` outside the BIOS
• Trim spaces from filesystem paths.
• Fix `import.lua` failing to upload a file.
• Reduce inconsistency with the table length operator in some cases
• Replaced rope and substring allocation with clusters
• This should hopefully fix performance and memory allocation issues with string concatenation
• Added new multi-touch events on mobile platforms
• `_CCPC_finger_touch`, `_CCPC_finger_up`, `_CCPC_finger_drag`
• All events get finger ID, X, and Y as parameters
• These events co-exist with single-touch mouse events
• iOS now has Page Up/Down keys on the arrow toolbar for quicker navigation
• Added function authentication for C functions to mitigate bytecode vulnerabilities
• Improved performance of binary `file.readAll`
• `unpack` no longer uses a table's `n` field
• Fixed error when setting palette colors on windows in 256-color graphics mode
• Fixed more crashing when filesystem functions fail (#280)
• Fixed crashes due to stack overflows
• Fixed WebSocket pings sending a close response (#214)
• Fixed crashes in `websocket.receive()` when receiving a message that's too large (#297, #214)
• Fixed vague error message responses when an HTTP request fails (#292)
• Fixed DAP crash from setting a breakpoint in an unknown file
• Fixed breakpoints activating on the wrong line
• Fixed first line of a file not being able to trigger a breakpoint
• Fixed debugger errors when invalid arguments are used on the ccdb command line (#294)
• Fixed precision issues with `os.epoch("nano")` (#299)
• Fixed `rawlen` and `__ipairs` being missing from the global table
• Fixed some inconsistencies with seeking beyond a file's limits (#310)
v2.7.2
Jan 21, 2023
CraftOS-PC v2.7.2 is mostly a maintenance release, fixing a bunch of bugs that have plagued people for a while. It also updates CC:T support to 1.101.1, which includes a new style for uploading files. I hope to make some more significant fixes in the next version (including some pervasive memory issues with ropes), but I needed to get these first few bugs squashed as soon as possible.

• Updated CC:T version to 1.101.1
• File drag-and-drop now queues a file_transfer event on the computer. The built-in shell or the import program must now be running to upload files.
• The peripheral now searches for remote peripherals using any peripheral with the peripheral_hub type, not just wired modems.
• Add include_hidden option to fs.complete, which can be used to prevent hidden files showing up in autocomplete results. (IvoLeal72)
• Add shell.autocomplete_hidden setting. (IvoLeal72)
• Prevent edit's "Run" command scrolling the terminal output on smaller screens.
• Mention WAV support in speaker help (MCJack123).
• Add http programs to the path, even when http is not enabled.
• Fix example in textutils.pagedTabulate docs (IvoLeal72).
• Fix help program treating the terminal one line longer than it was.
• Fixed a syntax error in the CCEmuX plugin's `emu` program (#271)
• Fixed a bug causing copies out of virtual mounts to fail (#272)
• Adjusted some behavior of ropes to hopefully make them faster & use less memory
• Further fixes are in progress to fully optimize memory usage
• Fixed issues when reading from a bad file handle
• Fixed crashing when some filesystem functions fail
• This was causing autocompletion on `config` to fail on Windows (#273), as well as crashing when using `fs.getSize` on a folder (#281)
• Fixed failure to launch on Apple Silicon Macs due to incorrectly named libraries (#287)
• Fixed missing `chest.getItemLimit` method (#291)
• Adjusted some logic in WebSocket handles to fix some potential issues
• Fixed window palettes being broken in graphics mode
v2.7.1
Sep 2, 2022
After over a year since v2.6, CraftOS-PC is getting another major update. This version brings generic peripheral emulation and plenty of bugfixes to go around.

* Bumped CC:T version to 1.100.9
* Added basic WAV support to speaker.lua
* Added basic generic peripheral emulation
* New peripheral types: `chest`/`minecraft:chest` (`inventory`), `tank` (`fluid_storage`), `energy` (`energy_storage`)
* `tank` and `energy` may also have custom types set on them (for emulating compatible blocks from other mods)
* See the full documentation for more info
* Rewrote filesystem code to use C++17 filesystem library
* Added ability to resize monitors programmatically, including by block size (#261)
* Added `istailcall` field to `debug.getinfo`
* Adjusted configuration loading code to avoid crashes from invalid files
* Keystrokes now automatically reset modifier keys on mobile platforms
* Fixed "not enough memory" error when calling `string.rep` with a negative length
* Fixed a crash from invalid WebSocket data
* Fixed an HTTP issue causing the `Host` header to be set incorrectly when connecting to `localhost`
* Fixed a crash if a computer is closed before an HTTP request finishes
* Fixed a rendering issue when using a custom font with the hardware renderer
* Fixed `string.format("%q")` not accepting non-string arguments (#251)
* Fixed a typo in the `setGraphicsMode` argument checking code
* Fixed an issue causing the debugger to error after a reboot
* Fixed a crash when using `debug.getinfo(f, ">")`

*If you need help using CraftOS-PC, I'm available on the [CraftOS-PC Discord server](https://www.craftos-pc.cc/discord) as `@JackMacWindows#9776`. Feel free to ping me if you need anything.*
v2.6.6
May 9, 2022
This update contains changes from v2.6.4, v2.6.5, v2.6.5.1, and v2.6.6.

* Added new arrow key buttons to the toolbar
* Updated CC:T version to 1.100.5
* Speakers can now play arbitrary PCM audio.
* Add support for encoding and decoding DFPWM streams, with the cc.audio.dfpwm module.
* Fix the "repeat" program not repeating broadcast rednet messages.
* Added `useDFPWM` config setting to toggle use of DFPWM playback emulation
* Added `speaker.setPosition(x, y, z)` to emulate positioning of speaker audio
* Standards mode now controls the behavior of the new `speaker.playAudio`
* When disabled, all audio is added to a queue with no latency
* When enabled:
* `speaker_audio_empty` is queued when the audio is 0.5 seconds before it's expected to finish, emulating latency
* `speaker.playAudio` returns `false` if there is more than 0.5 seconds of audio in the buffer
* `useDFPWM` is forced to `true`
* Renamed `speaker.stopSounds` to `speaker.stop`
* `stopSounds` still exists for backwards compatibility, but is deprecated
* `speaker.playLocalMusic` is now deprecated in favor of `speaker.playAudio`
* It is recommended you load the audio files yourself instead of relying on the system to decode it
* Added `nano` clock to `os.epoch` (@SkyTheCodeMaster)
* Added caching to rope resolution to avoid concatenating the same rope multiple times
* Modified `string.rep` to work more like Cobalt
* Added an indicator showing whether the debugger console is no longer auto-scrolling
* Disabled loading of original `package` and `io` libraries to reduce possible vulnerabilities
* Enabled proper HTTPS certificate verification
* Added support for URLs to `cc.http.gist`/`gist` program
* Added `seek` method to binary HTTP handles
* Added strip option to `string.dump` from Lua 5.3
* Small compatibility fixes to drives
* Fixed a critical crashing issue when opening the navigation bar or keyboard (#238)
* Fixed some string comparisons not working as expected
* Fixed incorrect documentation on mobile gestures (#230)
* Fixed keyboard on iOS being dismissed when closing the app (#231)
* Fixed screen glitches when opening a new terminal after changing `useHDFont` (SkyTheCodeMaster)
* Fixed some issues with textutils.serializeJSON
* Fixed possible race condition in `mouse_move`
* Fixed an issue preventing the debugger console from scrolling
* Fixed fragments being included in HTTP requests (#239)
* Fixed `paintutils.drawBox` not working properly in graphics mode
* Fixed type of `http_max_websocket_message` config setting
* Fixed crash when passing negative values to `monitor.scroll` (#244)
* Fixed possible race condition in WebSockets (crash report)
* Fixed a possible crash when a rogue event is sent (crash report)
* Fixed a crash when an event is sent to a computer that was just destroyed (crash report)
* Fixed a possible crash when the abort timer triggers right as the computer shuts down (crash report)
v2.6.3
Dec 17, 2021
CraftOS-PC v2.6.3 updates CC: Tweaked compatibility to 1.99.1, and fixes a plethora of small but annoying bugs. In addition, this version is officially bringing the new mobile UIs to the full release builds.

* Added brand-new UI on mobile devices
* Redesigned UI with navigation bar & hotkey toolbar above keyboard
* Added support for computer, debugger, and monitor peripherals
* Change windows using the arrows in the navigation bar
* Automatic shell resizing makes sure you can see what you type
* Added new launch screen
* Tap with two fingers to open the navigation bar
* Updated CC:T version to 1.99.1
* Peripherals can now have multiple types. `peripheral.getType` now returns multiple values, and `peripheral.hasType` checks if a peripheral has a specific type.
* Add feature introduction/changed version information to the documentation. (MCJack123)
* Rednet can now handle computer IDs larger than 65535. (Ale32bit)
* Optimise peripheral calls in `rednet.run`. (xAnavrins)
* Add `cc.pretty.pretty_print` helper function (Lupus590).
* Fix `textutils.serialize` not serialising infinity and nan values. (Wojbie)
* Add `package.searchpath` to the `cc.require` API. (MCJack123)
* Added ability to set printer ink color
* Added support for hexadecimal floating-point numbers
* Unwritable data directories now throw an error
* Default peripherals now throw an error when calling a method that doesn't exist
* Terminal frozen status is now reset after rebooting
* `\0` characters in a string are now treated as a space by `load`
* Fixed websocket.receive not functioning properly
* Fixed crash when using `detach` on a debugger
* Fixed coroutine metatable getting overwritten by coroutine.create
* Fixed `keepOpenOnShutdown` using 100% CPU
* Fixed Ctrl+R not working with `keepOpenOnShutdown` after two successive reboots
* Fixed `getCursorBlink` being missing from monitors
* Fixed monitor events not working properly in raw mode
* Fixed a possible race condition when shutting down on exit
* Fixed race condition in timer erasure
* Fixed various other small race conditions
* Improved WebSocket server functionality
* Servers can now be properly opened by calling `http.websocket` with a port argument
* Multiple clients to the same server now get unique identifiers as userdata values
* Added `websocket_server_closed` event to notify when an opened WebSocket server is no longer accepting connections
* WebSocket text messages are now sent in UTF-8
* Improved Rednet deduplication efficiency (part of CC:T 1.99.0)
* cash no longer saves duplicate history entries
* Fixed crashing whenever opening a debugger (from crash reports)
* Fixed a crash when comparing two identical substrings (#218)
* Fixed a crash caused by force-closing a computer after it's already gone (from crash reports)
* Fixed a crash in `term.drawPixels` when passing a negative value (#224)
* Fixed occasional crashes from `get_comp` cache duplication (from crash reports)
* Fixed crashes and incorrect behavior when using `string.format` with substrings (from crash reports: Creepi)
* Fixed binary support in WebSocket messages
* Fixed stack overflow when an error handler attempts to yield (from crash reports)
* Fixed a bug causing old `os` functions to be exposed (!)
* Fixed an incorrect error message when concatenating a concatenated string or substring with a value of an invalid type (9551)
* Fixed an issue with completion for boolean config settings

*If you need help using CraftOS-PC, I'm available on the [CraftOS-PC Discord server](https://www.craftos-pc.cc/discord) as `@JackMacWindows#9776`. Feel free to ping me if you need anything.*
v2.6.1
Sep 1, 2021
After going off-the-grid for a month, I'm back with a new update to CraftOS-PC. CraftOS-PC v2.6.1 fixes a number of high-priority issues, tweaks a few things, and brings CC:T compatibility to the latest version.

CraftOS-PC 2's second anniversary is fast approaching (September 8). This is really an amazing milestone for me, and watching this little test project grow into a program used by hundreds to thousands of people, including large livestreamers, has been super exciting. When I first started working on CraftOS-PC 2, I thought it would be a project I worked on for maybe a couple of months, and then I'd leave it alone to move on to other things. But I've kept working on it pretty much every week since then, adding hundreds of features and bug fixes over two years. I'm real proud of how far it's come, and I hope you're enjoying using it. Thank you for your support!

• Bumped CC:T version to 1.98.2
° Add motd for file uploading.
° Fix `settings.define` not accepting a nil second argument (SkyTheCodeMaster).
° Add a missing type check for `http.checkURL`.
° Prevent `parallel.*` from hanging when no arguments are given.
° Prevent issue in rednet when the message ID is NaN.
° Fix `help` program crashing when terminal changes width.
° Prevent `wget` crashing when given an invalid URL and no filename.
° Correctly wrap string within `textutils.slowWrite`.
• Added support for screenshots and recordings in WebP format
° WebP is an image format that is much smaller than PNG/GIF and supports animation
° All modern web browsers and OSes support WebP images
- Unfortunately, Discord does not support WebP recordings at the moment.
° Recordings can be up to 20x smaller than their GIF counterparts
° Disabled by default; enable the `useWebP` config option to use WebP instead of PNG/GIF
• Implemented limits for HTTP options that were present but non-functional
• Added automatic shell resizing when opening the keyboard on mobile platforms
° This can be disabled through the `shell.mobile_resize_with_keyboard` setting
• Parameters to events are now copied when standards mode is enabled
• Opening a file when the maximum file count is reached now creates the file as expected
• Rewrote `websocket.receive` function in C to perform better
• Fixed WebSockets not sending PONG packets, causing sockets to randomly close after a while
• Fixed crashes when trying to use a WebSocket handle after closing it
• Fixed a race condition in HTTP requests that caused a crash
• Fixed a race condition causing crashes when running a task on the main thread
• Fixed a race condition causing functions (like `term.write`) to be run on the wrong computer
• Fixed an issue causing the first frame of GIFs to be darker than the rest of the recording
• Fixed modems not checking if channel numbers are in range
• Fixed `utf8.charpattern` not existing
• Fixed crash error message not appearing in standards mode
• Fixed `os.clock()` not resetting on reboot (#215)
• Fixed some websites failing to connect
° TLS 1.3 was disabled (pocoproject/poco#3395), so HTTPS connections may be slightly less secure
• Fixed duplication of default black/whitelist entries
• Fixed `pairs` returning incorrect values after a call hook
v2.6
Jul 23, 2021

CraftOS-PC FAQ

CraftOS-PC is available in regions other than the following restricted countries:
France
CraftOS-PC supports English
CraftOS-PC contains in-app purchases. Please check the pricing plan as below:
Plugin Collection 1
$0.99
Click here to learn how to download CraftOS-PC in restricted country or region.
Check the following list to see the minimum requirements of CraftOS-PC.
iPhone
Requires iOS 13.0 or later.
iPad
Requires iPadOS 13.0 or later.
iPod touch
Requires iOS 13.0 or later.

CraftOS-PC Alternative

You May Also Like