Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

CtruLua 3DS: Difference between revisions

From GameBrew
No edit summary
m (Text replacement - "{{Infobox-3DS-Homebrews" to "{{Infobox 3DS Homebrews")
Line 1: Line 1:
{{Infobox-3DS-Homebrews
{{Infobox 3DS Homebrews
| title = ctruLua
| title = ctruLua
| image = https://dlhb.gamebrew.org/3dshomebrew/ctrulua-01.png|250px
| image = https://dlhb.gamebrew.org/3dshomebrew/ctrulua-01.png|250px

Revision as of 01:35, 20 October 2021

ctruLua
[[1]]
General
AuthorFirew0lf, Reuh, Negi
TypeGame engine
VersionV1.0
Last Updated2016/11/27
Links
Download
Website
Source

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.

Warning: the 'u' in the repo's name is a 'µ', not a 'u'.

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

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

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

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.

Advertising: