Separate names with a comma.
Discussion in 'NDS - ROM Hacking and Translations' started by CalebW, Nov 17, 2013.
Which is better to program DS homebrew in? C or C++?
You can use both! It also depends on what you are making. Here is a good C++ tutorial that can help you start programming.
Just some of the basics, you can also check the examples in devkitarm for more DS-Specific examples or always ask here, there are a few DS programmers around still.
Depends upon what you want to do. C++ is workable on the DS but it may not have the edge as far as performance goes compared to C, however by the time that really matters to you* then you will have bigger things to worry about.
If you prefer there are considerably higher level languages than both of those, though I appreciate all languages I would be wrong to point you at anything other than lua really (most of the others are more tech demo or just for the fun of the original programmer). Lua is especially developed with http://sourceforge.net/projects/microlua/ probably being the more well developed at this point. You will not be making the next mario kart in it but graphics and text are quite possible with it (puzzle quest on the DS is more or less written in it if you want an idea of what is possible) and will allow you to get something up and running quite quickly.
Normally here I would drop a bunch of links like http://devkitpro.org/wiki/Getting_Started/devkitARM , http://dev-scene.com/NDS/Tutorials_Day_1 and http://www.coranac.com/tonc/text/toc.htm but I will hold back from making a full on linkfest for the time being.
*naturally you could write some spaghetti in either but assuming you are programming properly.
My personal preference is C, I find it simpler and it allows for more hands-on control, however it lacks some of the higher-level functionality C++ offers. It's probably best to mix-and-match depending on what you want to do, really.
C++ is C with classes. If you like using functions to organize code, use C. If you prefer objects, methods, and classes, use C++. They'll both produce perfectly fine machine code. Its just two different styles.
The nice thing about C++ is that it is backward compatible with C so you can try both styles interchangeably and find out what you like.
Snailface I thought I was the only one on the temp who lisened to CCR!
and also could resist posting:
Thanks for all of the answers. So...you can use C syntax inside of C++?