More actions
What is ctr�Lua? ctr�Lua, note the case, is, as you can deduce, 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. What can it do? You'll have to ask the guys at development. Or check the TODO list on GitHub. Most of the features we wanted are in, there may be a few bugfixes left to do though. What about the lads that made it? - Organization members Firew0lf We're... pretty sure he's a huge nerd. No, more like nerd king. He's one of the two developers on the project, and probably the one most eager to expand it. He also goes by geeker and I personally believe he must be yelling at all times IRL. Reuh Same, a developer. Pretty mature and really silent, I mean it, sometimes I wonder if he died in front of his screen. Also probably a nerd. Negi Loud-mouthed and pretty much useless. He did the shitty icon. A giga-nerd and self-proclaimed "community"-manager because no one takes care of this damned website and because it's fun. He never participates in code and unintentionally got credited. With Special Thanks To... - Non-member contributors VideahGams Oh, and...The lads before that? - Projects built upon Please note that this list is almost certainly incomplete. smea, for the ctrulib. And...Credits to whoever made the code they might have helped themselves on, if they did, that is. They don't really keep me updated on that.
ctr�Lua
Warning: the 'u' in the repo's name is a '�', not a 'u'.
Users part
How to install
- Download ctruLua.zip from the releases (for something stable) or the CI server (for more features)
- Unzip it on your SD card, in a folder inside your homebrews folder; if you use HBL, extract it in
/3ds/ctrulua/
- Put some scripts wherever you want, just remember where
- Launch Ctr�Lua from your homebrew launcher
- Use the shell to run your scripts
Homebrewers part
Builds build status
- Most recent working build: ctruLua.3dsx
- See http://ci.reuh.tk/ctrulua for all the builds.
Hello world
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
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:
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()
Lua API Documentation
- An online version of the documentation can be found here
- To build the documentation, run
make build-doc-html
(requires LDoc).
Developers part
Build instructions
- Setup your environment as shown here : http://3dbrew.org/wiki/Setting_up_Development_Environment
- Clone this repository and run the command
make build-all
to build all the dependencies. - If you only made changes to ctr�Lua, run
make
to rebuild ctr�Lua without rebuilding all the dependencies.
May not work under Windows.
Credits
- Smealum and everyone who worked on the ctrulib: https://github.com/smealum/ctrulib
- Xerpi for the sf2dlib, sftdlib and sfillib
- All the Citra developers
- Everyone who worked on DevKitARM
- Nothings for the stb libs
- Everyone who worked on the other libs we use
With this release, ctr�Lua supports all the most common features needed to create a 2D game or app. See the README.md for installation and usage instructions. Build f118baa. Working 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 Lua scripts included with the release: Sprite library Configurable filepicker Shell to select and launch scripts Configurable keyboard library Text editor with Lua syntax highlighting Code examples Not working at the moment: TCP server socket (#10) Returning to the HB menu when exiting ctr�Lua (#5). Use L+R+Down+B to return to the HB launcher instead. Todo: Maybe h.264 decoding. Maybe. 3D drawing / migrating to citro3D