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
m (Text replacement - "image = https://dlhb.gamebrew.org/3dshomebrew/" to "image = ")
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox 3DS Homebrews
{{Infobox 3DS Homebrews
| title = ctruLua
|title=ctrµLua
| image = ctrulua-01.png|250px
|image=Ctrulua2.png
| type = Game engine
|description=A Lua interpreter for 3DS, brought to life by the remnants of the Lua community.
| version=V1.0
|author=Firew0lf, Reuh, Negi
| lastupdated = 2016/11/27
|lastupdated=2016/11/27
| licence = Mixed
|type=Game Engine
| author = Firew0lf, Reuh, Negi
|version=1.0
| website = https://github.com/ctruLua/ctruLua
|license=Mixed
| download = https://dlhb.gamebrew.org/3dshomebrew/ctruLua-1.0.rar
|download=[https://dlhb.gamebrew.org/3dshomebrews/ctrulua.7z 1.0] & [https://reuh.eu/ctrulua/ci/ctrulua CI Server]
| source = https://github.com/ctruLua/ctruLua
|website=http://ctrulua.github.io
|source=https://github.com/ctruLua/ctruLua
}}
}}
<youtube>Pc3rhzx25_A</youtube>
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.


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.
With the latest release, ctrµLua supports all the most common features needed to create a 2D game or app.


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.
==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.


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.
==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>


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.
Put some scripts wherever you want, just remember where.


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.
Launch CtrµLua from your Homebrew Launcher, then use the shell to run your scripts.


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.
===Building===
Setup your environment as shown [http://3dbrew.org/wiki/Setting_up_Development_Environment here].


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.
Clone this repository and run the command <code>make build-all</code> to build all the dependencies.


'''Warning: the 'u' in the repo's name is a 'µ', not a 'u'.'''
If you only made changes to ctrµLua, run <code>make</code> to rebuild ctrµLua without rebuilding all the dependencies.


==Working features:==
'''Note:''' May not work under Windows.


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:
==User guide==
 
===Hello world===
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 [https://github.com/ctruLua/ctruLua/releases releases] (for something stable) or the [http://ci.reuh.tk/ctrulua 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 <code>/3ds/ctrulua/</code>
* 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 ====
 
* Most recent working build: [http://ci.reuh.tk/ctrulua/builds/latest/artifacts/ctruLua.3dsx ctruLua.3dsx]
* See http://ci.reuh.tk/ctrulua for all the builds.
 
==== Hello world ====


<source lang="lua">local ctr = require(""ctr"")
<source lang="lua">local ctr = require(""ctr"")
Line 73: Line 75:
  gfx.render()
  gfx.render()
end</source>
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:
 
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 91: Line 96:


gfx.disableConsole()</source>
gfx.disableConsole()</source>
==== Lua API Documentation ====


* 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]).


=== Developers part ===
==Changelog==
 
'''v1.0 Build f118baa'''
==== Build instructions ====
* Sprite library.
 
* Configurable filepicker.
* Setup your environment as shown here : http://3dbrew.org/wiki/Setting_up_Development_Environment
* Shell to select and launch scripts.
* Clone this repository and run the command <code>make build-all</code> to build all the dependencies.
* Configurable keyboard library.
* If you only made changes to ctrµLua, run <code>make</code> to rebuild ctrµLua without rebuilding all the dependencies.
* Text editor with Lua syntax highlighting.
 
* Code examples.
May not work under Windows.


=== Credits ===
[https://github.com/ctruLua/ctruLua/releases Release notes.]


* '''Smealum''' and everyone who worked on the ctrulib: https://github.com/smealum/ctrulib
==Credits==
* '''Xerpi''' for the [https://github.com/xerpi/sf2dlib sf2dlib], [https://github.com/xerpi/sftdlib sftdlib] and [https://github.com/xerpi/sfillib sfillib]
* Smealum and everyone who worked on the [https://github.com/smealum/ctrulib ctrulib].
* '''All the [https://citra-emu.org/ Citra] developers'''
* Xerpi for the [https://github.com/xerpi/sf2dlib sf2dlib], [https://github.com/xerpi/sftdlib sftdlib] and [https://github.com/xerpi/sfillib sfillib].
* '''Everyone who worked on [http://devkitpro.org/ DevKitARM]'''
* All the [https://citra-emu.org Citra] developers.
* '''Nothings''' for the [https://github.com/nothings/stb stb] libs
* Everyone who worked on [http://devkitpro.org DevKitARM].
* Everyone who worked on the other libs we use
* Nothings for the [https://github.com/nothings/stb 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.
==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
Ctrulua2.png
General
AuthorFirew0lf, Reuh, Negi
TypeGame Engine
Version1.0
LicenseMixed
Last Updated2016/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

  • An online version of the documentation can be found here.
  • To build the documentation, run make build-doc-html (requires 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.

Release notes.

Credits

External links

Advertising: