Homebrew Question Wich coding language is used on the switch

Bedel

The key of the blade
Member
Joined
Oct 28, 2015
Messages
1,384
Trophies
0
XP
2,851
Country
United States
Mostly C, but you now can program in python, lua or javascript. I also remember someone talking about C++, but not sure.
 

Crownfox

Active Member
Newcomer
Joined
May 19, 2018
Messages
38
Trophies
0
Age
33
XP
137
Country
United States
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.
 

Bedel

The key of the blade
Member
Joined
Oct 28, 2015
Messages
1,384
Trophies
0
XP
2,851
Country
United States
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?
 

vickdu31

Well-Known Member
Member
Joined
Nov 14, 2016
Messages
228
Trophies
0
Age
27
XP
353
Country

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.
 

Bedel

The key of the blade
Member
Joined
Oct 28, 2015
Messages
1,384
Trophies
0
XP
2,851
Country
United States
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
 

LeifEricson

Coming Soon™
Member
Joined
Jun 22, 2012
Messages
234
Trophies
0
Age
27
Location
New York, USA
Website
www.youtube.com
XP
534
Country
United States
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

Shrike

Well-Known Member
Member
Joined
Mar 10, 2018
Messages
120
Trophies
0
Age
34
XP
832
Country
Germany
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

General chit-chat
Help Users
  • Jayro @ Jayro:
    Eventhough the New 3DS XL is more powerful, I still feel like the DS Lite was a more polished system. It's a real shame that it never got an XL variant keeping the GBA slot. You'd have to go on AliExpress and buy an ML shell to give a DS phat the unofficial "DS Lite" treatment, and that's the best we'll ever get I'm afraid.
    +1
  • Jayro @ Jayro:
    The phat model had amazingly loud speakers tho.
    +1
  • SylverReZ @ SylverReZ:
    @Jayro, I don't see whats so special about the DS ML, its just a DS lite in a phat shell. At least the phat model had louder speakers, whereas the lite has a much better screen.
    +1
  • SylverReZ @ SylverReZ:
    They probably said "Hey, why not we combine the two together and make a 'new' DS to sell".
  • Veho @ Veho:
    It's a DS Lite in a slightly bigger DS Lite shell.
    +1
  • Veho @ Veho:
    It's not a Nintendo / iQue official product, it's a 3rd party custom.
    +1
  • Veho @ Veho:
    Nothing special about it other than it's more comfortable than the Lite
    for people with beefy hands.
    +1
  • Jayro @ Jayro:
    I have yaoi anime hands, very lorge but slender.
  • Jayro @ Jayro:
    I'm Slenderman.
  • Veho @ Veho:
    I have hands.
  • BakerMan @ BakerMan:
    imagine not having hands, cringe
    +1
  • AncientBoi @ AncientBoi:
    ESPECIALLY for things I do to myself :sad:.. :tpi::rofl2: Or others :shy::blush::evil:
    +1
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ if you could find a v5 DS ML you would have the best of both worlds since the v5 units had the same backlight brightness levels as the DS Lite unlockable with flashme
  • The Real Jdbye @ The Real Jdbye:
    but that's a long shot
  • The Real Jdbye @ The Real Jdbye:
    i think only the red mario kart edition phat was v5
  • BigOnYa @ BigOnYa:
    A woman with no arms and no legs was sitting on a beach. A man comes along and the woman says, "I've never been hugged before." So the man feels bad and hugs her. She says "Well i've also never been kissed before." So he gives her a kiss on the cheek. She says "Well I've also never been fucked before." So the man picks her up, and throws her in the ocean and says "Now you're fucked."
    +1
  • BakerMan @ BakerMan:
    lmao
  • BakerMan @ BakerMan:
    anyways, we need to re-normalize physical media

    if i didn't want my games to be permanent, then i'd rent them
    +1
  • BigOnYa @ BigOnYa:
    Agreed, that why I try to buy all my games on disc, Xbox anyways. Switch games (which I pirate tbh) don't matter much, I stay offline 24/7 anyways.
  • AncientBoi @ AncientBoi:
    I don't pirate them, I Use Them :mellow:. Like I do @BigOnYa 's couch :tpi::evil::rofl2:
    +1
  • cearp @ cearp:
    @BakerMan - you can still "own" digital media, arguably easier and better than physical since you can make copies and backups, as much as you like.

    The issue is DRM
  • cearp @ cearp:
    You can buy drm free games / music / ebooks, and if you keep backups of your data (like documents and family photos etc), then you shouldn't lose the game. but with a disk, your toddler could put it in the toaster and there goes your $60

    :rofl2:
  • cearp @ cearp:
    still, I agree physical media is nice to have. just pointing out the issue is drm
    cearp @ cearp: still, I agree physical media is nice to have. just pointing out the issue is drm