Homebrew A question about the 3DS and programming

1Zero

Well-Known Member
OP
Newcomer
Joined
Sep 18, 2015
Messages
67
Trophies
0
XP
111
Country
Venezuela
This might sound stupid, but should a complete beginner who's interested in 3DS homebrew, learn how to program with C++ or Python ?
 

Lucar

Well-Known Member
Member
Joined
Sep 12, 2015
Messages
528
Trophies
0
XP
619
Country
Canada
LUA would be best, C is way out of a beginners league. Plus, LUA is like Python in some ways, so it would make it easier to learn python earlier.
 

sup3rgh0st

Top Tier Ghost
Member
Joined
Apr 22, 2010
Messages
456
Trophies
1
XP
2,700
Country
United States
You should learn C, which is used with Smea's Homebrew Launcher. Take a look at his samples here: https://github.com/smealum/ctrulib/tree/master/examples : as well as the Pixel program that comes with DevKitARM/CitruLIB.
You can go a long way by just copy-pasting from samples and modifying numbers. When in doubt, look at other peoples source : http://www.3dbrew.org/wiki/Homebrew_Applications : to learn how to make the basics, then expand on what you learned. While I'm sure people would say my code is sloppy and terrible, feel free to look at the source for a simpler game I made : https://github.com/sup3rgh0st/Chroma-Cannon :.
 

730

Professional Shitposter
Member
Joined
Apr 2, 2015
Messages
485
Trophies
0
XP
628
Country
Argentina
I've only used Lua (lpp-3DS) and it's reaaaaally easy, you can do really neat stuff like playing sound or drawing fonts with 2-5 lines of code. Eventually I want to learn (and migrate to, if possible) C/C++, but yeah, I'll take it easy.
 

~Poke~

Well-Known Member
Member
Joined
Aug 18, 2015
Messages
260
Trophies
0
XP
144
Country
Lua is probably a lot better for a beginner. I have some experience coding JavaScript so I thought I'd be ok jumping into C. That was silly considering the differences, but I think I'm getting there... That said, there's a lot to know about C and a lot of formalities that you can completely skip with a scripting language like Lua. C code will end up running more efficiently IF you get it right, but that's a big if and in a lot of cases it isn't worth it. Meanwhile Lua should allow you to code your program more easily and efficiently. It also looks like there are a lot of functions built in to lpp that there aren't 3ds C libraries for, though maybe I just haven't found them :P
 

Aidan25

Well-Known Member
Newcomer
Joined
Oct 2, 2015
Messages
59
Trophies
0
Location
Down Under
XP
83
Country
Lua is probably a lot better for a beginner. I have some experience coding JavaScript so I thought I'd be ok jumping into C. That was silly considering the differences, but I think I'm getting there... That said, there's a lot to know about C and a lot of formalities that you can completely skip with a scripting language like Lua. C code will end up running more efficiently IF you get it right, but that's a big if and in a lot of cases it isn't worth it. Meanwhile Lua should allow you to code your program more easily and efficiently. It also looks like there are a lot of functions built in to lpp that there aren't 3ds C libraries for, though maybe I just haven't found them :P
What sort of things can you code with Lua? Also where can I learn it?
 

keanutah

Well-Known Member
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
As someone who is pretty decent at C, start with Lua. I've been writing Lua myself and it's perfect for small programs and games, and Lua Player Plus has a pretty damn good library to give you access to common 3DS functionality, so you won't really be missing out on much unless you're trying to do something more advanced.
 
  • Like
Reactions: Aidan25

Aidan25

Well-Known Member
Newcomer
Joined
Oct 2, 2015
Messages
59
Trophies
0
Location
Down Under
XP
83
Country
As someone who is pretty decent at C, start with Lua. I've been writing Lua myself and it's perfect for small programs and games, and Lua Player Plus has a pretty damn good library to give you access to common 3DS functionality, so you won't really be missing out on much unless you're trying to do something more advanced.
Interesting. Where can I download the IDE or compiler/interpreter?
 

TheCruel

Developer
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,130
Country
United States
Where's the best place I can learn this or what can I do to use my current programming skills to teach myself it?
It really depends how you want to learn things. These days there are a lot of interactive sites I think are fun to learn languages (e.g. codecademy.com) so you can try that, and others, if you want.

I personally wouldn't start programming for the 3ds. It's harder and more frustrating than common programming for PC and you can't do as much. But that's your call.
 

Aidan25

Well-Known Member
Newcomer
Joined
Oct 2, 2015
Messages
59
Trophies
0
Location
Down Under
XP
83
Country
It really depends how you want to learn things. These days there are a lot of interactive sites I think are fun to learn languages (e.g. codecademy.com) so you can try that, and others, if you want.

I personally wouldn't start programming for the 3ds. It's harder and more frustrating than common programming for PC and you can't do as much. But that's your call.
I guess I could try one of them. Yeah well I've done a bit of PC programming, simple programs mainly in a language that is obsolete and no one uses that we learned programming on at school. I think I can transfer my skills though to C or C++ even though FutureBASIC (the aforementioned language) is not object oriented/a 4GL.
 

BringusStudios

Well-Known Member
Member
Joined
Oct 3, 2011
Messages
442
Trophies
1
Age
24
Website
bringus.studio
XP
608
Country
United States
I guess I could try one of them. Yeah well I've done a bit of PC programming, simple programs mainly in a language that is obsolete and no one uses that we learned programming on at school. I think I can transfer my skills though to C or C++ even though FutureBASIC (the aforementioned language) is not object oriented/a 4GL.
I actually learned lua from making Garry's Mod addons!
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,256
Trophies
4
Location
Space
XP
13,813
Country
Norway
Lua is definitely the easiest to get into if you have never programmed before, but C/C++ is more useful knowledge to have since it's used on virtually every operating system and device and is a lot faster than scripting, and if you ever want to have a job in programming it's a very useful language to know.

If you end up going with C/C++ it would be best to start with programming something simple for PC before you try making 3DS homebrew, since the libraries there are a lot more mature making programming for the platform easier, and you could use a library like for example SDL to make game development easier. Once you are familiar with C/C++ programming for PC, it will be easier to get used to it for 3DS.

Otherwise Lua is not a bad choice if you are fine with just making simple 2D games and don't care about programming beyond 3DS homebrew.
 
Last edited by The Real Jdbye,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/MddR6PTmGKg?si=mU2EO5hoE7XXSbSr