DS Programming Language

Discussion in 'NDS - ROM Hacking and Translations' started by CalebW, Nov 17, 2013.

  1. CalebW
    OP

    CalebW Fellow Temper

    Member
    634
    154
    Jun 29, 2012
    United States
    Which is better to program DS homebrew in? C or C++?
     
  2. ipwndeveloper

    ipwndeveloper GBAtemp Regular

    Member
    276
    68
    Jun 3, 2013
    United States
    San Fransisco, CA
    Foxi4 likes this.
  3. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,522
    9,359
    Nov 21, 2005
    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.
     
    ipwndeveloper likes this.
  4. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,558
    21,536
    Sep 13, 2009
    Poland
    Gaming Grotto
    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.
     
    Snailface likes this.
  5. Snailface

    Snailface My frothing demand for 3ds homebrew is increasing

    Member
    4,324
    1,983
    Sep 20, 2010
    Engine Room with Cyan, watching him learn.
    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.
     
  6. ipwndeveloper

    ipwndeveloper GBAtemp Regular

    Member
    276
    68
    Jun 3, 2013
    United States
    San Fransisco, CA
    slightly offtopic:
    Snailface I thought I was the only one on the temp who lisened to CCR!
    and also could resist posting:
    [​IMG]
     
    Snailface likes this.
  7. CalebW
    OP

    CalebW Fellow Temper

    Member
    634
    154
    Jun 29, 2012
    United States
    Thanks for all of the answers. So...you can use C syntax inside of C++?