DS Development and programming in general

Discussion in 'General Off-Topic Chat' started by iritegood, Dec 9, 2007.

Dec 9, 2007
  1. iritegood
    OP

    Member iritegood GBAtemp Advanced Fan

    Joined:
    May 15, 2007
    Messages:
    759
    Country:
    United States
    Well, inspired by all the great homebrew out there, I've decided to pick up programming as a personal project.
    However, I have absolutely no idea where to start. I wanted to learn python, seeing as how it looks so minimalistic and easy-to-read compared to the other languages I've found. (except for lolcode of course)

    Where should I start? Which books should I read? Any advice would be appreciated. [​IMG]
     
  2. Azimuth

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    Python is an excellent choice, its easy and fun to learn, has nice syntax and is very widely used so you will get help easily.
    Programming python is one of the most widely used python books and the 3rd edition is free, its kinda become the standard python book.

    What exactly do you want to program though, do you want to code nds games or do you just want to learn a programming language?
     
  3. iritegood
    OP

    Member iritegood GBAtemp Advanced Fan

    Joined:
    May 15, 2007
    Messages:
    759
    Country:
    United States
    Games are a lot more interesting to me, and specifically DS homebrew.
    Thanks for the link [​IMG]
     
  4. Azimuth

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    Then learn C/C++, python would be a waste of time if all you are interested in is DS homebrew. I would personally recommend learning python before jumping straight to C/C++ which will be hard if you have no programming experience.
     
  5. iritegood
    OP

    Member iritegood GBAtemp Advanced Fan

    Joined:
    May 15, 2007
    Messages:
    759
    Country:
    United States
    Ey? Didn't realise that, I guess I'll just start off with python. C/C++ syntax seems complicated. The most programming I've had is probably javascript, which was actually quite simple.
     
  6. deufeufeu

    Member deufeufeu GBAtemp Advanced Fan

    Joined:
    Nov 21, 2005
    Messages:
    880
    Country:
    Cote d'Ivoire
    hehe I guess I was one of the source of your python love.
    Python is very good for prototyping program however if you really plan on writing ds games, it's not really a good place to start, except if you plan on doing some 3d on the ds. In this case I'd suggest you try making an opengl game with pyopengl, this way when learning C/C++ afterwards you could port your existing game, as the libnds (and thus the ds hardware) is similar to opengl.
     
  7. Azimuth

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    deufeufeu, I'm sure you'll enjoy this [​IMG]

    [​IMG]

    He's right about the whitespace....
     
  8. deufeufeu

    Member deufeufeu GBAtemp Advanced Fan

    Joined:
    Nov 21, 2005
    Messages:
    880
    Country:
    Cote d'Ivoire
    Whitespace is good !
    as an example of evil : fortran doesn't feel whitespace is needed even when reading a variable : so FOR I FOR I which is the name of the counter ? yes it's IFORI [​IMG]
    as an example of good : http://en.wikipedia.org/wiki/Whitespace_%2...ing_language%29

    Winners use whitespace !

    This was an advertisment brought to you by the Whitespace company
     
  9. Linkiboy

    Member Linkiboy GBAtemp Testing Area

    Joined:
    May 14, 2006
    Messages:
    4,888
    Country:
    United States
    Easy wey to get started:

    1. learn the basic C syntax, it should take you a day to a week, depending if you're lazy or... uhh... not lazy
    2. find devkitpro somewhere, install it.
    3. go to palib.com, and install palib
    4. look at some of the examples and try your own hand at coding, palib is very easy to use, no need to worry about the technical aspect of it, its just things like drawSprite(x,y,sprite,pallete); or something and not like devkitpro where its like: set_video_mode(complicated things); allocate_vram(blablabla);
     
  10. test84

    Member test84 GBAtemp's last ninja 2.

    Joined:
    Sep 8, 2006
    Messages:
    3,685
    Location:
    Iran, Tehran.
    Country:
    Iran
    Would you guys help in learning Object Oriented Game development?
    I know programming in C/C++ and i even developed a snake for DOS, but for larger games, i'm so confused with OO disciplines, i donno how to Design the game (NOT coding it, DESIGNING).

    Like how to build proper Access functions for objects and how to share methods in order to follow OO rules and make re-use objects.

    (i dont mean to hijack your topic, but my question seems relevant)
     
  11. Azimuth

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    test84, you might want to check this out. OO is easy, it just takes a while for things to click.

    small example in ruby:
    Code:
    class Animal
    Âattr_reader :name Â#accessor
    Â
    Âdef initialize(name) #sets initial state of new object
    Â Â@name = name
    Âend
    
    Âdef hello
    Â Â print "My name is ", @name
    Âend
    end
    now when I call:
    Code:
    person = Animal.new("John")
    person is assigned as an animal with "John" as a name, thats great but how do I retrieve the object's name later on? thats what accessors are for, they allow you to call up variables from outside the class or "access" them.
    Code:
    person.name => "John"
    person.hello => "My name is John"
    To share methods you have to use inheritance which is a whole other subject. Hope I helped you a bit.
     

Share This Page