Homebrew [Release] Lua Player Plus 3DS (lpp-3ds) - LUA interpreter for 3DS

  • Thread starter Thread starter Rinnegatamante
  • Start date Start date
  • Views Views 187,230
  • Replies Replies 1,199
  • Likes Likes 35
Woah what is this? I use RPG Maker VX Ace on cmputer, does this let you make games on 3DS or play ones you've made?

You can make it using .lua files.
I'm making THE LEGEND OF THE BLACK SWORD using RPG Maker. In the future, I'll create an post for download the game. At the moment I'm practising. I've some problems with the code and I'd like to know the possibilites of LUA in RPG Maker 3DS. :)
 
  • Like
Reactions: Seriel
Hi!

How can I put an music in RPG Maker 3DS using Lua?
And another question... Have you planned update RPG Maker for use new LUA functions?

Thanks! ^^

Basically, RPG Maker 3DS use a normal lpp-3ds build with some slight changes so yes, you can use musics.
 
  • Like
Reactions: Seriel
Just read about RPG Maker 3ds and I´m pretty new to all of this Homebrew stuff Do i need anything special to install/run it? I copyed the folder from https://github.com/Rinnegatamante/RPG-Maker-3DS
to sd/3ds and seperated the .3dsx to sd/3ds too, because it didn´t show up otherwise. When I try to run it now, i come to the screen which says this was made with lua player plus, then i get a black screen at it freezes.

Using o3ds on FW 9.9
 
I want to get started with lpp-3ds as I have lua experience from Gmod and LOVE2D, and I start off by trying the example program "mic" and it works until I press "play sound" [SCREENSHOT]

I want to start making my own program but it scares me with the fact that the example programs don't even work!

I'm on an o3DS with v9.9.0-26U using TubeHax, and here's how I have it set up: [SCREENSHOT]

Tell me if I'm doing it all wrong or if the examples are just broken...
Thanks in advanced!
 
I want to get started with lpp-3ds as I have lua experience from Gmod and LOVE2D, and I start off by trying the example program "mic" and it works until I press "play sound" [SCREENSHOT]

I want to start making my own program but it scares me with the fact that the example programs don't even work!

I'm on an o3DS with v9.9.0-26U using TubeHax, and here's how I have it set up: [SCREENSHOT]

Tell me if I'm doing it all wrong or if the examples are just broken...
Thanks in advanced!

MIC sample has to be considered as broken until new revision came up cause a little bug appeared with error handler support implementation.
To fix it you can simply build the latest github commit or compile a lpp-3ds commit with -DSKIP_ERROR_HANDLING as flag.
 
MIC sample has to be considered as broken until new revision came up cause a little bug appeared with error handler support implementation.
To fix it you can simply build the latest github commit or compile a lpp-3ds commit with -DSKIP_ERROR_HANDLING as flag.

Alright, so it's just mic that's broken. That's what I originally thought but I wanted to check with you to make sure.

Thanks!
 
Is there anything else a green pixel in the bottom left corner could mean besides no index.lua?

I don't know, but i know images show up funny if you don't save them in 32-bit format, very often running through the whole image sheet.
 
Can you tell me which rendering are you using (CPU or GPU) and what format gives you that problem?

The image displays incorrectly (it actually displays so badly it shatters itself into a million pixels through all other loaded images) I believe on both CPU and GPU rendering: I initially tested a bunch of times with the image example, using both an image saved in bitmap and png, using paint.NET's auto-detect Bit-depth (which is usually 8-bit)

Using JPGs or manually changing paint.NET's format to 32-bit (24-bit for BMP) caused the files to be rendered correctly. Or maybe I just failed to program it properly since I'm new. Anyway, I know something weird happened with the pixels going all over the place, and although I can't replicate it now, I certainly can show you that the bitmap does not work if saved using paint.NET's auto-detect, which I believe is 8-bit:
 

Attachments

Last edited by HexZyle,
I'm trying to get the stereoscopic 3D to work. This is called as long as the 3d slider is enabled:
Code:
Screen.enable3D()
Screen.waitVblankStart()
Screen.refresh()
Screen.clear(TOP_SCREEN)
Screen.clear(BOTTOM_SCREEN)

Screen.drawPartialImage(0,0,5,0,395,240,img_menu_main,TOP_SCREEN,RIGHT_EYE)
Screen.drawImage(5,0,img_menu_main,TOP_SCREEN,LEFT_EYE)

I can see the top screen is obviously in 3D mode, however both images are only being displayed to the left eye. The functions perform as they normally would in non-3D as well, as if the RIGHT_EYE and LEFT_EYE parameters weren't even there.

Code:
Screen.drawImage(5,0,img_menu_main,TOP_SCREEN,RIGHT_EYE)
Hangs the program.
 
Last edited by HexZyle,
How would I go about reading cirlce pad input? I just want to read up, down, left, and right, no inbetweens.
 
Code:
function paddirection()
    x,y = Controls.readCirclePad()
    local t = --tolerance: how far you need to push the stick before it detects input
    if (x>t) and (x>math.abs(y))
        return 'right'
    elseif (x<-t) and (math.abs(x)>math.abs(y))
        return 'left'
    elseif (y>t) and (y>math.abs(x))
        return 'down'
    elseif (y<-t) and (math.abs(y)>math.abs(x))
        return 'up'
    end
end

I presume that code should work.
 
Last edited by HexZyle,
Sorry, got a few values mixed up. I fixed it in my previous post.
You'll also need to input your own value for t, or clear the line and use it as an argument. I don't actually know the scope of the pad's movement, whether it goes from 0-1 or some other number, so you'll have to play around with tolerance (start at 0, then 0.5, and if that's still too sensitive, increase it)
 
Last edited by HexZyle,
  • Like
Reactions: CKlidify
One final question, is it possible to align the debugPrint text to be centered, or to the right?
 
Alright so I wrote up this program as a simple calculator, and it works perfectly fine on citra (other than the pictures appearing as a glitch for some reason) but when I run it on my 3ds it's a black screen on both the top and bottom screens...

Code:
white = Color.new(255, 255, 255)
num1 = 0
num2 = 0
operation = 1
answer = 0
remainder = 0
oldpad = Controls.read()
uparrow = Screen.loadImage("/up.bmp")
downarrow = Screen.loadImage("/down.bmp")
while true do
    Screen.refresh()
    pad = Controls.read()
    x,y = Controls.readTouch()
    Screen.clear(TOP_SCREEN)
    Screen.clear(BOTTOM_SCREEN)
    if (Controls.check(pad,KEY_DUP)) and not (Controls.check(oldpad,KEY_DUP)) then
        num1 = num1 + 1
    end
    if (Controls.check(pad,KEY_DDOWN)) and not (Controls.check(oldpad,KEY_DDOWN)) then
        num1 = num1 - 1
    end
    if (Controls.check(pad,KEY_DRIGHT)) and not (Controls.check(oldpad,KEY_DRIGHT)) then
        num2 = num2 + 1
    end
    if (Controls.check(pad,KEY_DLEFT)) and not (Controls.check(oldpad,KEY_DLEFT)) then
        num2 = num2 - 1
    end
    if(Controls.check(pad,KEY_TOUCH)) and not (Controls.check(oldpad, KEY_TOUCH)) then
        x,y = Controls.readTouch()
        if(x > 19) and (x < 99) and (y > 30) and (y < 55) then
            num1 = num1 + 1
        elseif(x > 19) and (x < 99) and (y > 160) and (y < 185) then
            num1 = num1 - 1
        elseif(x > 119) and (x < 199) and (y > 30) and (y < 55) then
            if operation == 5 then
                operation = 1
            else
                operation = operation + 1
            end
        elseif(x > 119) and (x < 199) and (y > 160) and (y < 185) then
            if operation == 1 then
                operation = 5
            else
                operation = operation - 1
            end
        elseif(x > 219) and (x < 299) and (y > 30) and (y < 55) then
            num2 = num2 + 1
        elseif(x > 219) and (x < 299) and (y > 160) and (y < 185) then
            num2 = num2 - 1
        end
    end
    if (Controls.check(pad,KEY_A)) and not (Controls.check(oldpad,KEY_A)) then
        operation = 1
        answer = num1 + num2
    end
    if (Controls.check(pad,KEY_B)) and not (Controls.check(oldpad,KEY_B)) then
        operation = 2
        answer = num1 - num2
    end
    if (Controls.check(pad,KEY_Y)) and not (Controls.check(oldpad,KEY_Y)) then
        operation = 3
        if num2 > 0 then
            answer = num1 // num2
            remainder = num1 % num2
        end
    end
    if (Controls.check(pad,KEY_X)) and not (Controls.check(oldpad,KEY_X)) then
        operation = 4
        answer = num1 * num2
    end
    if (Controls.check(pad,KEY_SELECT)) and not (Controls.check(oldpad,KEY_SELECT)) then
        operation = 5
        answer = num1 ^ num2
    end
    if (Controls.check(pad, KEY_START)) then
        System.exit()
    end
    Screen.drawImage(20,31,uparrow,BOTTOM_SCREEN)
    Screen.drawImage(120,31,uparrow,BOTTOM_SCREEN)
    Screen.drawImage(220,31,uparrow,BOTTOM_SCREEN)
    Screen.drawImage(20,161,downarrow,BOTTOM_SCREEN)
    Screen.drawImage(120,161,downarrow,BOTTOM_SCREEN)
    Screen.drawImage(220,161,downarrow,BOTTOM_SCREEN)
    if operation == 1 then
        answer = num1 + num2
        Screen.debugPrint(0,30,num1 .. " + " .. num2 .. " = " .. answer,white,TOP_SCREEN)
    elseif operation == 2 then
        answer = num1 - num2
        Screen.debugPrint(0,30,num1 .. " - " .. num2 .. " = " .. answer,white,TOP_SCREEN)
    elseif operation == 3 then
        if num2 ~= 0 then
            answer = num1 // num2
            remainder = num1 % num2
            if remainder ~= 0 then
                Screen.debugPrint(0,30,num1 .. " / " .. num2 .. " = " .. answer .. "r" .. remainder,white,TOP_SCREEN)
            else
                Screen.debugPrint(0,30,num1 .. " / " .. num2 .. " = " .. answer,white,TOP_SCREEN)
            end
        else
            Screen.debugPrint(0,30,num1 .. " / " .. num2 .. " = UNDEFINED",white,TOP_SCREEN)
        end
    elseif operation == 4 then
        answer = num1 * num2
        Screen.debugPrint(0,30,num1 .. " x " .. num2 .. " = " .. answer,white,TOP_SCREEN)
    elseif operation == 5 then
        answer = num1 ^ num2
        Screen.debugPrint(0,30,num1 .. "^" .. num2 .. " = " .. answer,white,TOP_SCREEN)
    end
    Screen.flip()
    oldpad = pad
    Screen.waitVblankStart()
end

Here's up.bmp and down.bmp: http://imgur.com/a/syCtr

EDIT: The touch screen part does work just fine, it's just the image is glitched
 
Last edited by CKlidify,

Site & Scene News

Popular threads in this forum