[Preview] cpp3ds - Homebrew library and environment tutorial (for developers)

Discussion in '3DS - Homebrew Development and Emulators' started by TheCruel, Sep 26, 2015.

  1. TheCruel
    OP

    TheCruel Developer

    Banned
    1,351
    2,883
    Dec 6, 2013
    United States
    I've been working on this for a few months and will be finalizing some code within the next couple weeks that will make it usable by all homebrew developers.

    https://github.com/cpp3ds/cpp3ds

    cpp3ds is a port of SFML, paired with an emulator and complete CMake build environment, made specifically for 3ds homebrew development. It uses gl3ds, which is my WIP OpenGL port for the 3DS (so you can directly use OpenGL functions just like you can in SFML) but it's very limited and somewhat broken atm.

    It's very easy to use and keeps your games relatively portable, assuming you don't break out of the framework and start using ctrulib directly or something. The only difficult part really is installing and getting your development environment set up properly. Many people already struggle with getting ctrulib and devkitarm set up properly, but this is more difficult since it has several dependencies (one being Qt5 for the emulator, though that can be optional).

    I suggest reading the SFML tutorials if you want to learn more about what can be done with this library.



    The purpose of this thread is to primarily inform people of the project's existence and upcoming release. The actual release that discusses installation and usage will be in another thread when ready.
     
    Last edited by TheCruel, Oct 23, 2015


  2. JerwuQu

    JerwuQu Advanced Member

    Newcomer
    56
    66
    Feb 15, 2015
    I'm surprised I'm the first one to say that this is f**king awesome.

    This is going to help lots of people that want to create homebrew. I mean, we already have Rinnegatamante's lpp-3ds but this is native and looks fresh as f**k.

    I've used SFML in the past so I'm really looking forward to a stable version of this.

    Thanks a lot, man! :D
     
    MRJPGames and Margen67 like this.
  3. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    18,045
    8,564
    Oct 27, 2002
    France
    Engine room, learning
    nice tutorial :)
    it looks great and easy (when it's you doing it).
    I always use notepad++ to write codes, but having an IDE with integrated emulator/3dslink is easier to see the result.
     
    Margen67 likes this.
  4. BurningDesire

    BurningDesire GBAtemp Psycho!

    Member
    4,950
    5,749
    Jan 27, 2015
    United States
    Behind a screen reading news
    This. Is. Amazing.
     
    Margen67 likes this.
  5. TheCruel
    OP

    TheCruel Developer

    Banned
    1,351
    2,883
    Dec 6, 2013
    United States
    Yeah, thanks.

    My goal is mostly to bring 3ds game dev up to normal modern standards. You can barely make any decent homebrew for the 3ds without learning a lot about the hardware, exploits, different tools like makerom, etc. Most game developers don't want to have to do that much, they don't want to have to read reversed engineered documentation about how to access low-level hardware stuff. Then when cpp3ds is more stable, I can focus on making gl3ds more complete (I literally just implemented the functions that SFML uses to get cpp3ds working).
     
    Margen67, WhoAmI? and clank like this.
  6. Garcia98

    Garcia98 Hey! Listen!

    Member
    361
    188
    Sep 8, 2015
    Salamanca
    So I don't have to worry yet if I can't even compile the library, right? :P

    Good job making this BTW
     
    Margen67 likes this.
  7. TheCruel
    OP

    TheCruel Developer

    Banned
    1,351
    2,883
    Dec 6, 2013
    United States
    Yeah, it's missing some stuff atm. It'll be usable in a couple days. I'll post here when it's ready, then you (and anyone else interested) can give it some beta testing.
     
    Margen67, clank and Garcia98 like this.
  8. BurningDesire

    BurningDesire GBAtemp Psycho!

    Member
    4,950
    5,749
    Jan 27, 2015
    United States
    Behind a screen reading news
    I know this is awesome and all but. Woudn't it be even more awesome if it had support for lua and the devkit arm c library! I'm thinking something like xcode where when you want to develop you get a dropdown menu (after you select create new project) then when you click on ios it say "Spritekit, etc" then you develop with that syntax/language
     
  9. robot56

    robot56 Advanced Member

    Newcomer
    94
    31
    Sep 13, 2015
    United States
    I'd definitely be interested in using something like this. Any update on the status of the project?
     
  10. TheCruel
    OP

    TheCruel Developer

    Banned
    1,351
    2,883
    Dec 6, 2013
    United States
    Yeah, I got a test build for everyone to test. For the sake of more simpler beta testing, I excluded the emulator (it's too buggy now anyways).

    The build is linux-only (64-bit) atm, but in reality you can use this build in Windows and 32-bit linux too, but everything in the bin directory will need to be replace with Windows-built tools (makerom, bannertool, etc.)

    Here are the steps to testing the beta:

    1. Download the build: https://github.com/cpp3ds/cpp3ds/releases/download/v0.1/cpp3ds-linux-v0.1.tar.xz

    2. Extract it anywhere you want and create a CPP3DS env variable that points to the cpp3ds folder that was extracted.

    3. Using the above env variable, add $CPP3DS/bin to your PATH

    4. Then you just clone the template repo and build it with the following commands:

    Code:
    git clone https://github.com/cpp3ds/cpp3ds-template.git
    cd cpp3ds-template
    mkdir build && cd build
    cmake ..
    make
    
    Please let me know if anything fails.
     
    Last edited by TheCruel, Oct 8, 2015
    Tjessx and Garcia98 like this.
  11. cere_ender

    cere_ender Member

    Newcomer
    42
    3
    Jul 7, 2015
    That's freaking awesome!! I saw the Spine Demo! I will wait for this all time it need
     
  12. Garcia98

    Garcia98 Hey! Listen!

    Member
    361
    188
    Sep 8, 2015
    Salamanca
    It works fine :D
     
    PokeAcer likes this.
  13. suloku

    suloku GBAtemp Advanced Fan

    Member
    862
    491
    Apr 28, 2008
    This is awesome.
     
    PokeAcer likes this.
  14. cere_ender

    cere_ender Member

    Newcomer
    42
    3
    Jul 7, 2015
    Have an error in "make" step in file bannertool when Generating cpp3ds-template.smdh : syntax error: "(" unexpected
     
  15. TheCruel
    OP

    TheCruel Developer

    Banned
    1,351
    2,883
    Dec 6, 2013
    United States
    Any additional detailed from output?

    And did you modify anything else in CMake file (like APP_TITLE or something)?
     
  16. cere_ender

    cere_ender Member

    Newcomer
    42
    3
    Jul 7, 2015
    That's my output. I didn't edit anything, only I configured the enviroment variables for DEVKITPRO,DEVKITARM, and CPP3DS.
     

    Attached Files:

  17. Garcia98

    Garcia98 Hey! Listen!

    Member
    361
    188
    Sep 8, 2015
    Salamanca
    I had this version of bannertool installed beforehand so you can try to compile this and use this instead
     
  18. cere_ender

    cere_ender Member

    Newcomer
    42
    3
    Jul 7, 2015
    hahahahaha I compiled bannertool and I use it copying on the cpp3ds/bin directory. Now I get this:
     

    Attached Files:

  19. Garcia98

    Garcia98 Hey! Listen!

    Member
    361
    188
    Sep 8, 2015
    Salamanca
    Use the other version then xD
    IDK why are you getting that error though as I didn't get any and I'm also using Ubuntu.
     
  20. TheCruel
    OP

    TheCruel Developer

    Banned
    1,351
    2,883
    Dec 6, 2013
    United States
    Does running "sh --version" say you're using bash? Or dash?

    I think his error come from the fact that Ubuntu uses dash by default. But if you're using dash too, I must be wrong.