Homebrew Question Wich coding language is used on the switch

  • Thread starter Thread starter yahel105
  • Start date Start date
  • Views Views 3,879
  • Replies Replies 15
Mostly C, but you now can program in python, lua or javascript. I also remember someone talking about C++, but not sure.
 
C is good for a lot of things, but does expect you to be able to program a lot of things from scratch.

Python for Switch seems to be good for filesystem tools, as it doesn't have access to much else.

Lua for Switch is capable of doing a lot of things on Switch, but whether or not C libs are usable on the switch in the context of Lua would be a defining factor in whether or not this as useful as using C.

JS for Switch isn't complete yet, but it doesn't have much access to the Switch outside of the SD card filesystem.

Out of these, I would recommend C if you know how to program using it.

If you just want to use Lua for some basic stuff, I'd recommend giving Love Potion for Switch a shot.
 
I'd add that I would personally prefer C++ over C due to conveniences with strings, vectors, objects, etc that are not available in plain C.
Yeah you are right. I program in Java and C# (ignoring javascript, php and phyton). Do you recommend me to learn some C++ in my free time to program homebrew for Switch, using devkitpro and libnx?
 

Lets say there is a genius here, are these libraries enough at their current state to reverse engineer the .nsp files/ build a package installer such as FBI or WupInstall ?

Yeah you are right. I program in Java and C# (ignoring javascript, php and phyton). Do you recommend me to learn some C++ in my free time to program homebrew for Switch, using devkitpro and libnx?
Once you master C++, you can pretty much do anything.
 
Lets say there is a genius here, are these libraries enough at their current state to reverse engineer the .nsp files/ build a package installer such as FBI or WupInstall ?


Once you master C++, you can pretty much do anything.
I know what an OOP language can do. That was not what I asked xD
 
I know what an OOP language can do. That was not what I asked xD

It wouldn't hurt to familiarize yourself with it, I'd say go for it. Another great thing is that C source files can be used in C++ projects, so for instance if you want to include a C library or existing C code you can do so, or you can just start teaching yourself by modifying some of the examples for C++ instead of C.
 
  • Like
Reactions: Bedel
If you just want to use Lua for some basic stuff, I'd recommend giving Love Potion for Switch a shot.

THIS ^

Especially when you are not that used to low level programming ...
With the right library LUA supports simple Classes, too. So simple OOP is no problem ;)
More information & sourcecode here: https://github.com/TurtleP/LovePotion/tree/switch

I suggest you downloading my port of Snake (https://gbatemp.net/threads/homebrew-snake-port-lovepotion.498467/) and look inside the *.lua files inside /game/.
You will see LovePotion gives you a good support for switch specific functions like controls or vibration.
Best usecase for LovePotion would be most 2D-Game genres like RPG, JumpAndRuns, PuzzleGames, ...
 

Site & Scene News

Popular threads in this forum