Akuma arsenal

A place for developers to promote games they have created with Moai

Akuma arsenal

Postby thebullno1 » Mon Feb 20, 2012 3:52 am

This is a collection of lua modules that I created to help development with Moai. Most will work with any host (including device hosts, Moai's GLUT host and your custom host), however, on desktop, it is only tested on Akuma.

ARC (Akuma Remote Console)
This create a lua server in your app to execute live command. Some possible use:
-Tweak some settings without reloading the project
-Spawn objects for testing

Download:
Bundled with Akuma 1.0: https://github.com/downloads/bullno1/Ak ... in-1.0.zip

Usage:
Include arc.lua, coxpcall.lua, copas.lua in your project folder
Put this piece of code in your main.lua:
Code: Select all
  1. require "arc" --load arc

  2. arc.start() --start the server on port 9090 (default)

  3. --alternatively

  4. arc.start(8080)--start the server on port 8080


See Akuma's "arc" sample for more info.

To access the server, use a tcp tool such as telnet or netcat. You can download netcat here http://joncraton.org/files/nc111nt.zip (note, some Antivirus recognizes it as a virus. It is not, however, it can be used as a backdoor and hack tool)
Connect to the server:
nc localhost 9090 (or nc your_device_ip port)
You will see a prompt and a welcome message. You have access to all hosts' function(except for print, which will be redirected to your console window. If for some reason, you want to print to host's output, use _G.print instead)
Try some commands such as:
Code: Select all
  1. =MOAIEnvironment.getViewSize() --prepend a command with = to print the returned values

  2. for k in pairs(_G) do print(k) end --dump the global environment

  3. --if you are running the "arc" sample in Akuma

  4. prop:moveLoc(-50, -50, 1) -- move the cat head

  5. =prop:getLoc()--get cat head's location

  6. quit --end the session (ctrl+c in windows works too)



That's all for now
User avatar
thebullno1
 
Posts: 256
Joined: Sat Jul 02, 2011 8:53 am

Return to Made With Moai

Who is online

Users browsing this forum: No registered users and 0 guests

cron

x