You do not have permission to edit this page, for the following reason:
The action you have requested is limited to users in one of the groups: Users, Administrators.
Free text:
ctrµLua is a Lua parser for 3DS. It's born within the µLua community as an attempt to bring their favorite piece of software to the 3DS. The result ended being mighty different from what was µLua itself. With the latest release, ctrµLua supports all the most common features needed to create a 2D game or app. ==Features== * HID (everything). * 2D graphics. * 3D support (with 2D graphics). * Texture loading and saving (PNG, JPEG, BMP, a lot of other formats). * Fonts (TTF, a lot of other formats). * Maps (.csv). * Sound (WAV and OGG with/without streaming). * Sockets (TCP and UDP). * HTTP contexts (with/without SSL). * Infrared communication (untested on hardware). * UDS services (local wireless communication). * Filesystem. * LZLib (zlib compression). * ROMFS. * Camera. * Microphone. * Threads. * PTM services. * Head tracking. * APT services. * User and system informations. * News. ==Installation== ===Installing=== Unzip ctrµLua on your SD card, in a folder inside your homebrews folder; if you use HBL, extract it in <code>/3ds/ctrulua/</code> Put some scripts wherever you want, just remember where. Launch CtrµLua from your Homebrew Launcher, then use the shell to run your scripts. ===Building=== Setup your environment as shown [http://3dbrew.org/wiki/Setting_up_Development_Environment here]. Clone this repository and run the command <code>make build-all</code> to build all the dependencies. If you only made changes to ctrµLua, run <code>make</code> to rebuild ctrµLua without rebuilding all the dependencies. '''Note:''' May not work under Windows. ==User guide== ===Hello world=== <source lang="lua">local ctr = require(""ctr"") local gfx = require(""ctr.gfx"") local hid = require(""ctr.hid"") while ctr.run() do hid.read() local keys = hid.keys() if keys.held.start then break end gfx.start(gfx.TOP) gfx.text(2, 2, ""Hello, world !"") gfx.stop() gfx.render() end</source> This script will print "Hello, world !" on the top screen, and will exit if the user presses Start. This is the "graphical" version; there's also a text-only version, based on the console: <source lang="lua">local ctr = require(""ctr"") local gfx = require(""ctr.gfx"") local hid = require(""ctr.hid"") gfx.console() print(""Hello, world !"") while ctr.run() do hid.read() local keys = hid.keys() if keys.held.start then break end gfx.render() end gfx.disableConsole()</source> ===Lua API Documentation=== * An online version of the documentation can be found [http://reuh.tk/ctrulua here]. * To build the documentation, run <code>make build-doc-html</code> (requires [https://github.com/stevedonovan/LDoc LDoc]). ==Changelog== '''v1.0 Build f118baa''' * Sprite library. * Configurable filepicker. * Shell to select and launch scripts. * Configurable keyboard library. * Text editor with Lua syntax highlighting. * Code examples. [https://github.com/ctruLua/ctruLua/releases Release notes.] ==Credits== * Smealum and everyone who worked on the [https://github.com/smealum/ctrulib ctrulib]. * Xerpi for the [https://github.com/xerpi/sf2dlib sf2dlib], [https://github.com/xerpi/sftdlib sftdlib] and [https://github.com/xerpi/sfillib sfillib]. * All the [https://citra-emu.org Citra] developers. * Everyone who worked on [http://devkitpro.org DevKitARM]. * Nothings for the [https://github.com/nothings/stb stb] libs. * Everyone who worked on the other libs we use. ==External links== * Official website - http://ctrulua.github.io * GitHub - https://github.com/ctruLua/ctruLua
Advertising: