HELP with PAlib and making homebrew games in general

Discussion in 'NDS - ROM Hacking and Translations' started by Dylan, Mar 9, 2008.

  1. Dylan
    OP

    Dylan 100 MILES AND RUNNIN'

    Member
    1,639
    4
    Mar 7, 2008
    Sydney, Australia
    Hi im 15 years old with almost no knowledge on how to make a homebrew game (for use with cyclods evo/r4/etc.). I have developed a huge intrest in making them though. I am running a mac but have so far downloaded PAlib. Please someone put together a faq or something to help me to learn how to use PAlib and make games with it.
     
  2. Urza

    Urza hi

    Member
    6,493
    89
    Jul 18, 2007
    United States
  3. jeklnoo

    jeklnoo GBAtemp Fan

    Member
    335
    0
    Oct 20, 2006
    United States
    palib = pure fail
     
  4. Dylan
    OP

    Dylan 100 MILES AND RUNNIN'

    Member
    1,639
    4
    Mar 7, 2008
    Sydney, Australia
    lol thats what most people say. more like mac = pure fail
     
  5. Triforce

    Triforce GBAtemp Advanced Fan

    Member
    538
    0
    Mar 17, 2005
    London
    All the DS devs i know hate PAlib with a passion but for 1st time game development it should be ok, it depends on what you want to do really.
    I came up with the idea for an adaptation of Hudsons Shooting Watch and had a friend code it with PAlib while i looked after the graphics and music. PAlib was fine for what we wanted to do but it certainly has it's limitations.
     
  6. Dylaan

    Dylaan GBAtemp Fan

    Member
    384
    0
    Jul 5, 2007
    Just wondering what anyone would recommend as an alternative to PAlib?
     
  7. Normmatt

    Normmatt Former AKAIO Programmer

    Member
    2,142
    543
    Dec 14, 2004
    New Zealand
    Libnds, or better yet pure using the hardware directly without using a library (or write your own library).
     
  8. Noitora

    Noitora ::

    Member
    3,768
    0
    Aug 9, 2007
    Greece
    Athens
    Using the hardware without a library? I don't think that it's possible.
     
  9. Normmatt

    Normmatt Former AKAIO Programmer

    Member
    2,142
    543
    Dec 14, 2004
    New Zealand
    Well that just proves you need to go read up about how software interacts with hardware, libraries are just snippets of code that interact with the hardware put into an easier to use wrapper. This is both good and bad, good because it means less work for the programmer using the library but it also means that the programmer won't know exactly how to interact with the hardware to get the best performance for the specific task he wants.

    Go read gbatek to understand how to interact with the hardware directly.
     
  10. deufeufeu

    deufeufeu GBAtemp Advanced Fan

    Member
    880
    0
    Nov 21, 2005
    libnds is almost directly mapping hardware registers. So I don't get your point. What would be the benefit of doing this by yourself ? It's not like libnds was a bloated c++ library to access hardware, it's really as straightforward as you can expect from a low-level library. The only part I've seen where you could bypass libnds are for really obfuscated part of the hardware, only references on gbatek.
     
  11. Normmatt

    Normmatt Former AKAIO Programmer

    Member
    2,142
    543
    Dec 14, 2004
    New Zealand
    Well by accessing the hardware directly instead of library calls you will learn more about how the library actually does it and thus you could more easily write code for other systems which dont have a library to use. Not to mention knowing how functions work is always handy when you start to delve into assembler.

    I myself use libnds simply because i'm too lazy to write my own wrapper and as you've already stated it is pretty minimal anyway. But it's never a bad thing to understand exactly how things work.
     
  12. Flam9

    Flam9 GBAtemp Regular

    Member
    171
    0
    Aug 11, 2006
    Canada
    I doubt a homebrew programmer is ever going to need that extra little push between PAlib and accessing the hardware directly.
    I even bet a bunch of commercial roms could have easily been made with PAlib
     
  13. Issac

    Issac oh!

    Global Moderator
    4,997
    1,762
    Apr 10, 2004
    Sweden
    could you point me out why libnds is so much better than palib? I myself think palib seems pretty nice, i must say. even made some small tests, which worked flawlessly...

    (No I am not a complete noob, since I study stuff related to this on a university, and made a few small games to the GBA, before the ds was out... )
     
  14. coolbho3000

    coolbho3000 GBATemp Kikkoman Naturally Brewed SoySauce Fanatic

    Member
    2,095
    29
    Apr 29, 2007
    Kikkoman Factory
    Can't you just include libnds and palib in the same project?
     
  15. FAST6191

    FAST6191 Techromancer

    pip Reporter
    22,916
    8,592
    Nov 21, 2005
    I too have no great love for palib but I do appreciate it is a good tool (some of the stuff using it and you could do far worse. In many regards it is similar to the visual basic (modern) versus C? debate (ignoring the license stuff).

    So in my eyes it tends to stem from two reasons, those being palib is quite a bit more high level code and performance issues:
    Most homebrew devs I have spoken to and even myself with the whole rom hacking thing tend to approach homebrew from an intellectual curiosity standpoint when it comes to the DS (while it is a standard with some interesting hardware there are far more powerful systems with far more programming resources available), using something that tends to abstract to basic maths like palib almost cheapens the whole thing. libnds on the other hand pretty much drops you in at the "IO routines are done and now it is up to you stage" leaving the "working with bare metal" feeling intact.

    There is also a performance hit, it is not that bad but it is enough for people to take notice: how many emulators and high performance/highly ambitious homebrew programs use it for anything more than a GUI? and on top of that you can see the trend towards working around limitations of the abstractions (a crude example might be saying use the "draw red box" feature to make a house or something whereas with libnds you might draw a house and import it.