Homebrew Whats the best way to start programing homebrew on tubehax for a noob?

Mr. Elementle

Well-Known Member
OP
Member
Joined
Dec 30, 2014
Messages
115
Trophies
0
Age
28
Location
Detroit
XP
550
Country
United States
I've been involved in some minor hacks and stuff before, mostly just graphics, but recently i've taken an interest in learning to program my own 3dsx homebrew, my programming knowledge is limited though.

Whats the best language to program in? I've seen a lot of people use C++ and C# but i keep seeing LUA being tossed around and whats the best way to compile for 3dsx files since i can't get visual studio to run.

EDIT: I should mention my first project i want to do isn't an original homebrew, it's a port of the ds homebrew IKUreader if it matters, i figured porting might be a bit easier to start with since i can study the already written code and see how it works, correct me if i'm horribly mistaken
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
I've been involved in some minor hacks and stuff before, mostly just graphics, but recently i've taken an interest in learning to program my own 3dsx homebrew, my programming knowledge is limited though.

Whats the best language to program in? I've seen a lot of people use C++ and C# but i keep seeing LUA being tossed around and whats the best way to compile for 3dsx files since i can't get visual studio to run.

EDIT: I should mention my first project i want to do isn't an original homebrew, it's a port of the ds homebrew IKUreader if it matters, i figured porting might be a bit easier to start with since i can study the already written code and see how it works, correct me if i'm horribly mistaken

If you start developing in LUA you don't have to set up any development environment and you don't have to compile anything in 3DSX cause lpp-3ds is just compiled.
 

BurningDesire

Well-Known Member
Member
Joined
Jan 27, 2015
Messages
4,999
Trophies
1
Location
Behind a screen reading news
XP
4,885
Country
United States
If you start developing in LUA you don't have to set up any development environment and you don't have to compile anything in 3DSX cause lpp-3ds is just compiled.
I've tried using llp when i put my homebrew app in the 3ds folder then run it I just get a green pixel and no hello world text This is with ironhax 2.1
 

BurningDesire

Well-Known Member
Member
Joined
Jan 27, 2015
Messages
4,999
Trophies
1
Location
Behind a screen reading news
XP
4,885
Country
United States
Your probably wrong with paths.
My homebrew name is llp in the llp folder i have helloworld.lua and a file called LLP.3dsx here is my code

while true do
Screen.waitVblankStart()
Screen.refresh()
Screen.debugPrint(400,240,"Hello World",Color.new(255,255,255),TOP_SCREEN)
Screen.flip()
end
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy

TheSockNaster

Kawaii
Banned
Joined
Feb 7, 2015
Messages
269
Trophies
0
Age
30
XP
204
Country
United States

Stop giving him the wrong information. He needs to learn first.

Thank you very much i didn't realize there was already a site for this

I recommend you learn C++ first before going to that website. There is no such thing as learning code specifically for one thing. You think the creators of those emulators went to that website and learned? NO! They learned C++ first and did it themselves. If you want to code like them then follow what I am saying. If you want to learn only specific things then you can go to that website, but if you want to learn how to do your own custom things then learn C++ first.
 

BurningDesire

Well-Known Member
Member
Joined
Jan 27, 2015
Messages
4,999
Trophies
1
Location
Behind a screen reading news
XP
4,885
Country
United States
File must be named index.lua, for the 4th time, have you at least read the OP of lpp-3ds thread? ... http://gbatemp.net/threads/release-lua-player-plus-3ds-lpp-3ds-lua-interpreter-for-3ds.384202/

I tried finding it after about the eight page i gave up

--------------------- MERGED ---------------------------

Stop giving him the wrong information.



I recommend you learn C++ first before going to that website. There is no such thing as learning code specifically for one thing. You think the creators of those emulators went to that website and learned? NO! They learned C++ first and did it themselves. If you want to code like them then follow what I am saying. If you want to learn only specific things then you can go to that website, but if you want to learn how to do your own custom things then learn C++ first.
How is that wrong information? I gave him a tutorial on how to set up the environment and if he want's a few crash courses in c if he want's legit lessons.
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
I tried finding it after about the eight page i gave up

--------------------- MERGED ---------------------------


How is that wrong information? I gave him a tutorial on how to set up the environment and if he want's a few crash courses in c if he want's legit lessons.



Eight page? OP = Opening post = first post...
 

TheSockNaster

Kawaii
Banned
Joined
Feb 7, 2015
Messages
269
Trophies
0
Age
30
XP
204
Country
United States
I tried finding it after about the eight page i gave up

--------------------- MERGED ---------------------------


How is that wrong information? I gave him a tutorial on how to set up the environment and if he want's a few crash courses in c if he want's legit lessons.


He will never code properly with that website. If he learns legit first then he can create something no one has created before. Learn C++ legit then look at the tutorials. Stop being stupid. He won't understand a thing if he starts there first. He will be really confused.

--------------------- MERGED ---------------------------

Eight page? OP = Opening post = first post...

Your good at coding. Can you agree with me? He will be confused and won't understand a thing if he starts there.
 

BurningDesire

Well-Known Member
Member
Joined
Jan 27, 2015
Messages
4,999
Trophies
1
Location
Behind a screen reading news
XP
4,885
Country
United States
Eight page? OP = Opening post = first post...
I always that that meant original poster xD. So i got it to work but i get a error about out abound buffors

400 x 240 is the screen size for the top 3ds

my code :
while true do
Screen.waitVblankStart()
Screen.refresh()
Screen.debugPrint(240,400,"Hello World",Color.new(255,255,255),TOP_SCREEN)
Screen.flip()
end
Also, everytime i leave the program i have to reboot the netloader via the y button

 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
I always that that meant original poster xD. So i got it to work but i get a error about out abound buffors

400 x 240 is the screen size for the top 3ds

my code :
while true do
Screen.waitVblankStart()
Screen.refresh()
Screen.debugPrint(240,400,"Hello World",Color.new(255,255,255),TOP_SCREEN)
Screen.flip()
end
Also, everytime i leave the program i have to reboot the netloader via the y button

void Screen.debugPrint(int x, int y, string text, u32 color, Image_id screen_id, [Eye_id] eye) - Write a string on screen or image.

Sample usage: Screen.debugPrint(0, 0, "Hello World", Color.new(255,255,255), TOP_SCREEN)
 

BurningDesire

Well-Known Member
Member
Joined
Jan 27, 2015
Messages
4,999
Trophies
1
Location
Behind a screen reading news
XP
4,885
Country
United States
void Screen.debugPrint(int x, int y, string text, u32 color, Image_id screen_id, [Eye_id] eye) - Write a string on screen or image.

Sample usage: Screen.debugPrint(0, 0, "Hello World", Color.new(255,255,255), TOP_SCREEN)
So is the while loop in lua equivalent to a void function in c

--------------------- MERGED ---------------------------

void Screen.debugPrint(int x, int y, string text, u32 color, Image_id screen_id, [Eye_id] eye) - Write a string on screen or image.

Sample usage: Screen.debugPrint(0, 0, "Hello World", Color.new(255,255,255), TOP_SCREEN)
Nevermind, didn't work the way i thought it would i'll continue experimenting.
 

BurningDesire

Well-Known Member
Member
Joined
Jan 27, 2015
Messages
4,999
Trophies
1
Location
Behind a screen reading news
XP
4,885
Country
United States
while loop in lua are the equivalent of while loop in C...
You had me thinking it was a void because you put.

void Screen.debugPrint(int x, int y, string text, u32 color, Image_id screen_id, [Eye_id] eye)

which i figured would go in the while loop then outside the while loop i would put

Screen.debugPrint(0, 0, "Hello World", Color.new(255,255,255), TOP_SCREEN)

to have it drawn
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
You had me thinking it was a void because you put.

void Screen.debugPrint(int x, int y, string text, u32 color, Image_id screen_id, [Eye_id] eye)

which i figured would go in the while loop then outside the while loop i would put

Screen.debugPrint(0, 0, "Hello World", Color.new(255,255,255), TOP_SCREEN)

to have it drawn

Ok, i'll restart from another point of view.
Do you know basic of C?

void is a type which means a generic variable substantially when used as a pointer and a null variable when used as a variable.
Functions in a documentation (like in header C/C++ files) are reported like this:

return_type name_of_function(type_of_argument name_argument);

so

void Screen.debugPrint(int x, int y, string text, u32 color, Image_id screen_id, [Eye_id] eye)

means that Screen.debugPrint doesn't return any kind of result.
 

BurningDesire

Well-Known Member
Member
Joined
Jan 27, 2015
Messages
4,999
Trophies
1
Location
Behind a screen reading news
XP
4,885
Country
United States
Ok, i'll restart from another point of view.
Do you know basic of C?

void is a type which means a generic variable substantially when used as a pointer and a null variable when used as a variable.
Functions in a documentation (like in header C/C++ files) are reported like this:

return_type name_of_function(type_of_argument name_argument);

so

void Screen.debugPrint(int x, int y, string text, u32 color, Image_id screen_id, [Eye_id] eye)

means that Screen.debugPrint doesn't return any kind of result.
Yaye i fixed it! Thank you for your help. I will definitely use Lua3DS for Osu3DS!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-