More actions
m (Text replacement - "Infobox 3DS homebrew" to "Infobox-3DS-Homebrews") |
No edit summary |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Infobox | {{Infobox 3DS Homebrews | ||
| title = | |title=ctrµLua | ||
| image = | |image=Ctrulua2.png | ||
| | |description=A Lua interpreter for 3DS, brought to life by the remnants of the Lua community. | ||
|author=Firew0lf, Reuh, Negi | |||
|lastupdated=2016/11/27 | |||
| author = Firew0lf, Reuh, Negi | |type=Game Engine | ||
| | |version=1.0 | ||
| download = https://dlhb.gamebrew.org/ | |license=Mixed | ||
| source = https:// | |download=[https://dlhb.gamebrew.org/3dshomebrews/ctrulua.7z 1.0] & [https://reuh.eu/ctrulua/ci/ctrulua CI Server] | ||
|website=http://ctrulua.github.io | |||
|source=https://github.com/ctruLua/ctruLua | |||
}} | }} | ||
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"") | <source lang="lua">local ctr = require(""ctr"") | ||
Line 66: | Line 75: | ||
gfx.render() | gfx.render() | ||
end</source> | end</source> | ||
This script will print | |||
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"") | <source lang="lua">local ctr = require(""ctr"") | ||
Line 84: | Line 96: | ||
gfx.disableConsole()</source> | gfx.disableConsole()</source> | ||
* An online version of the documentation can be found [http://reuh.tk/ctrulua here] | ===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]). | * 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 |
Latest revision as of 06:24, 6 Mayıs 2024
ctrµLua | |
---|---|
General | |
Author | Firew0lf, Reuh, Negi |
Type | Game Engine |
Version | 1.0 |
License | Mixed |
Last Updated | 2016/11/27 |
Links | |
[1.0 & CI Server Download] | |
Website | |
Source | |
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 /3ds/ctrulua/
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 here.
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.
Note: May not work under Windows.
User guide
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
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.
Credits
External links
- Official website - http://ctrulua.github.io
- GitHub - https://github.com/ctruLua/ctruLua