Programming Noobie

Discussion in 'NDS - ROM Hacking and Translations' started by imgod22222, Sep 12, 2006.

Sep 12, 2006

Programming Noobie by imgod22222 at 10:51 PM (2,887 Views / 0 Likes) 23 replies

  1. imgod22222
    OP

    Member imgod22222 GBAtemp's Original No-faced Member

    Joined:
    Jul 5, 2006
    Messages:
    1,555
    Country:
    United States
    Let's see... I'm highly unexperienced. I'm learning Flash, WAS learning C# but saw no reason to continue, and now C++ (Got a better book teaching me)

    Was wondering, wut language does the NDS use, i'm fairly certain its either C++ or C.
    Umm... based on what i know (very little) C++ makes consoles and windows forms, so which would i use for the NDS?
    And DirectX and OpenGL make games, so wut does the NDS use for games?

    I have Dev-C++, and I'm just starting "C++ For Dummies The All-in-One Desk Reference"

    So yea, was wondering how to test basic scripts on the NDS, what tools i need to download, etc etc etc. If it matters any, I'm running an XP machine, and have SC SD.
     


  2. agami

    Newcomer agami Member

    Joined:
    Nov 17, 2005
    Messages:
    21
    Country:
    United States
  3. imgod22222
    OP

    Member imgod22222 GBAtemp's Original No-faced Member

    Joined:
    Jul 5, 2006
    Messages:
    1,555
    Country:
    United States
    Well, after looking, some of its on drunkencoders, but with such amazingly slow DSL speeds, i can't browse much. If anyone would be so kind as to answer the questions in my first post, and also tell me where to get Visual Basic C++ from Microsoft Beta (they said beta was free) since Dev-C++ seems to be giving me a BS error after compiling.
    Thnx agami, if i'm lucky, ill hit a spike of no-lag (happens twice a week or so) and I'll be able to scan through dsdev.org

    EDIT: I would also greatly appreciate if someone could help me with Dev-C++, it says I can't compile My script looks like this (red text)
    #include
    #include

    int main(int argc, char *argv[])
    {
    cout
     
  4. aeonflame

    Newcomer aeonflame Newbie

    Joined:
    Jul 19, 2006
    Messages:
    1
    Country:
    United Kingdom
    Either add:
    using namespace std;
    after your #include lines, or prefix both cout and endl with std::, so you have:
    std::cout
     
  5. dg10050

    Member dg10050 GBAtemp Regular

    Joined:
    Jun 24, 2006
    Messages:
    188
    Country:
    United States
     
  6. ediblebird

    Member ediblebird GBAtemp Fan

    Joined:
    Aug 22, 2006
    Messages:
    313
    Country:
    Australia
    use devkit pro with palib.

    devkitpro

    PALIB

    on the palib site there is no end of links and help you can get on the forum and also an installation wiki
    that shows you how to install devkitpro and palib. follow the wiki and youll be coding in no time.
     
  7. Kyro

    Member Kyro GBAtemp Regular

    Joined:
    Nov 5, 2002
    Messages:
    111
    Location:
    California
    Country:
    France
    You should check this very interesting guide :

    http://www.patatersoft.info/manual.html
     
  8. imgod22222
    OP

    Member imgod22222 GBAtemp's Original No-faced Member

    Joined:
    Jul 5, 2006
    Messages:
    1,555
    Country:
    United States
    It sounds so simple, but it's just so right! Did it and fixed it up. [​IMG] [​IMG] I'm a happy camper. Until i learn the using thingy, i'll stick with cout since i know that at least ;D

    EDIT: Well, i just got to strings, i tried, and i'm getting ANOTHER compiler error! This is starting to piss me off. >< However, i must persist if i'm to remake OoT on DS (That is my ultimate goal in life at the moment)

    #include
    #include
    #include
    int main(int argc, char *argv[])
    {
    int first = 10;
    int second = 20;
    int result;
    result = first == second ? "equal" : "not equal";
    cout
     
  9. imgod22222
    OP

    Member imgod22222 GBAtemp's Original No-faced Member

    Joined:
    Jul 5, 2006
    Messages:
    1,555
    Country:
    United States
    BTW!
    Is devkitpro supposed to be an IDE or just a bunch of libraries?
     
  10. - Wrath of God -

    Member - Wrath of God - God

    Joined:
    Nov 8, 2003
    Messages:
    975
    Country:
    United States
    1. I believe DevKitPro uses GCC to compile.

    2. result = first == second ? "equal" : "not equal";

    I think there should be an if statement there. Dude - for beginning use TurboC++ 3.0 - that's what I used. Then move up. Type your stuff in notepad or something and compile with gcc.

    3. Visual Basic C++ does not exist. Visual Basic is a language and Visual C++ is a language - I think you mean Visual Studio.


    Good luck in your quest for programming. My best suggestion - learn an easier language to get the hang of it first - like Visual Basic.
     
  11. imgod22222
    OP

    Member imgod22222 GBAtemp's Original No-faced Member

    Joined:
    Jul 5, 2006
    Messages:
    1,555
    Country:
    United States
    ya, sorry. i meant visual C++. I guess I'll look at TurboC++ 3.0. As long as its free.
    And i don't want to learn visual basic. In school i'm learning actionscript in flash, and my little prior knowledge of C# and C++ is helping out a bit. (being able to distinguish variables, etc.)
     
  12. Heinrisch

    Member Heinrisch GBAtemp Regular

    Joined:
    Jun 27, 2006
    Messages:
    294
    Country:
    Sweden
    I am currently working on a assignment from school. We are supposed to write a specific program in Haskell.. anyone who is a haskell guru in here? [​IMG]
     
  13. rippon

    Newcomer rippon Member

    Joined:
    Dec 10, 2005
    Messages:
    48
    Country:
    United States
    Couple of things...

    Most programming for the DS is indeed done with C/C++, but the DS doesn't have 'console' or 'windows forms', as those are both part of your OS, and the DS doesn't really have an OS. Also, 'cout' is a stream, and the DS doesn't have any streams set up by default (at least not in the official compiler, dunno about the homebrew) so I would try to avoid that in favor of printf() which the DS can support. Before you'll be able to print a string though, you would first need to create a set of font images, load them into VRAM, and write your own printf routine to convert strings into tile indices [​IMG] It can be a LOT of work.

    Oddly enough, however, while text-based stuff is the easiest thing to do on a PC, you'd probably have a lot more luck on the DS if you just went straight into graphics. I would suggest learning the basics of C/C++ on your PC with Visual Studio Express (which is free), and once you're comfortable writing simple games there, download a DS or GBA dev kit and start trying out graphics.

    P.S. The DS is neither DirectX nor OpenGL, although it works SOMEWHAT similar to OpenGL. So, ignore DirectX unless you want to do PC or XBox games.
     
  14. Jeremysr

    Newcomer Jeremysr Member

    Joined:
    Jul 26, 2006
    Messages:
    21
    Location:
    Kamsack, Saskatchewan, Canada
    Country:
    Canada
  15. nunofgs

    Member nunofgs GBAtemp Regular

    Joined:
    Mar 16, 2006
    Messages:
    185
    Country:
    Portugal
    I know a bit but I'm no guru [​IMG]

    Fire away...
     
  16. Psyfira

    Member Psyfira Credit: 0ml. Insert tea to continue

    Joined:
    Dec 31, 2003
    Messages:
    3,887
    Location:
    England
    Country:
    United Kingdom
    It depends what he wants out of it. DSLua will give you a quicker working result, but it really will only make DS games. Learning C and C++ is a transferrable skill he can use for writing other programs later on. And once you've learnt one decent programming language you pick up the techniques that make it much simpler to expand and learn others.

    C++ is fine as a first language with the right kind of tutorials; you need one that really explains the basics of good programming as well as the language. There's more to read, but it's worth it in the long run. [​IMG]
     
  17. Jeremysr

    Newcomer Jeremysr Member

    Joined:
    Jul 26, 2006
    Messages:
    21
    Location:
    Kamsack, Saskatchewan, Canada
    Country:
    Canada
    DSLua isn't just for the DS, lua is a programming (or scripting) language for the PC and other systems like PSP.

    It's good to learn both since DSLua is a lot easier and faster and C++ lets you use microphone and wi-fi which aren't supported by DSLua yet.
     
  18. imgod22222
    OP

    Member imgod22222 GBAtemp's Original No-faced Member

    Joined:
    Jul 5, 2006
    Messages:
    1,555
    Country:
    United States
    Alright, i'll look into it. I downloaded it, read and saw it didn't work with SuperCard, then i saw an .sc.nds file so I'll redownload it and see how it works. ndslib needs which compiler, minGW or cygwin? And how do i set up Dev-C++ to work with it?

    Anyways, i emailed Nintendo asking them for OoT's source code and this is what the email read:


    Hello and thank you for contacting Nintendo,

    From time to time we hear from our fans with programming experience who wish to
    acquire development kits for purposes of game development. While we applaud
    your desire to develop software for our systems, Nintendo's development kits are
    only made available to established game developers.

    This means that you must have a stable business organization (adequate office
    facilities, equipment, personnel and financial resources) in order to ensure a
    secure and effective environment for working with its publisher, be it Nintendo
    or a third-party licensee. Also, you must have demonstrated the ability to
    develop and program excellent software for Nintendo video game systems or for
    other video game or computer systems.

    Sincerely,

    Nintendo of America Inc.
    Dervin Camden

    Nintendo's home page: http://www.nintendo.com/
    Power Line (Automated Product Info): (425) 885-7529

    ------



    ORIGINAL MESSAGE:
    -----------------


    From: imgod22222@aim.com
    Posted At: 15:49:27.000 10/06/2006
    Posted To: Nintendo
    Subject: Webform: Nintendo DS > Other

    Excuse me, Im a great fan of the Zelda series and was wondering: I heard about a
    release on the DS. I would like to make my own. I was curious to know whether or
    not Nintendo would be kind enough to share The Legend of Zelda: Ocarina of Time
    source code and other various files so I could attempt a homebrew remake. If you
    could I would really appreciate it.

    I thought it was pretty funny myself. Well if anyone can flame Nintendo quoting their "program excellent software for Nintendo" by talking about any crap games they've released and should be mortified to have put Nintendo's name on go right ahead. See if the dude at the other side of the computer gives up. [​IMG] Or maybe don't. That would be mean. [​IMG]

    So I'll read up a bit on computer C++ then apply those concepts to the DS. And by chance is the font file that comes with supercard's updates supposed to be for developers? I couldn't add it to microsoft's fonts.
     
  19. thefoxhole

    Member thefoxhole GBAtemp Regular

    Joined:
    Oct 18, 2006
    Messages:
    117
    Country:
    United States
    I am wondering what skill or skills are involved in making a nds game.. is there any program that is fairly easy to use.. I am interested in making a starcraft type of game. How many hours are involved as well. thanks fox
     
  20. Elrinth

    Member Elrinth :Master beyond your imagination:

    Joined:
    Nov 6, 2002
    Messages:
    2,795
    Location:
    Home @ UMEÅ
    Country:
    Sweden
    I just want to make one thing clear before you move on:
    LEARN THE BASICS OF C++ before you go on.

    I suggest buying a book which takes you through datatypes, templates, arrays, object oriented programming, io, api, sdk, general programming guidelines and so on.

    After that, you might have a look at nds C++ programming via the libs which the homebrew scene has made.

    thefoxhole:
    making a starcraft type of game takes atleast a year if you want it to become the same size.
    then you have to paint all the characters/creatures, animate them, add sound for them, create the maps.
    programming part:
    * you have ai which needs serious thought.
    * game rules
    * menus
    * hud/gui/ui
    * code handling for all the animations, graphics, sound
    * mapeditor! + map fileloader
    * etc etc...

    there are simply endless points here which I simply can't think of in one week for example... the list will become just bigger and bigger, because u realise more and more things as the time goes.

    simply put, one man can do all of the job. however it will take GREAT time from him. even more time if he needs to learn everything.
     

Share This Page