Homebrew Development

Discussion in '3DS - Homebrew Development and Emulators' started by aliak11, Jan 16, 2014.

  1. Magicrafter13

    Magicrafter13 GBAtemp Regular

    Member
    102
    18
    Feb 19, 2017
    United States
    Finally worked, thank you!

    Honestly just this post alone from you could be a tutorial. It's a shame there aren't any good tutorials for 3ds homebrew with libctru (other than the basic ones).
    I guess most homebrew developers are already really good at coding, and understand a lot of the terminology. I won't lie, I didn't understand structs in c++ until a few hours ago.

    In case you're wondering, here's what I missed:
    the Init() functions, the open and close archive, and I had incorrect syntax in openarchive.

    [Just saying, this: https://github.com/xem/3DShomebrew/wiki guide could use more work, and it's open to contributors. Maybe you could do some stuff about filesystem, and I mean more than just how to delete something, I mean a basic or advanced guide to how to use the filesystem functions. But obviously, it's up to you, just an idea.]
     
    Joel16 likes this.


  2. Joel16

    Joel16 Ils ne passeront pas

    Member
    486
    966
    May 8, 2011
    United States
    Doesn't concern you.
    You'll find most up to date samples here: https://github.com/devkitPro/3ds-examples

    But yes you're right most things are basic, and that repository doesn't even have an example for using FS_User functions. I had to read and break things/re-test over and over to get the FS_User functions working the first time. There's not a lot of information on how to use them apart from people who've used it in their open source projects on GitHub, and that's generally not a good starting point for new comers unless you know your way with 3DS homebrew development.
     
  3. Magicrafter13

    Magicrafter13 GBAtemp Regular

    Member
    102
    18
    Feb 19, 2017
    United States
    Yeah I've tried using other GitHub projects as examples for some things, but it's clear to me their level of expertise is far above mine, because when I look at their code I have no idea what's going on half the time.
     
  4. jt_1258

    jt_1258 GBAtemp Advanced Maniac

    Member
    1,557
    840
    Aug 21, 2016
    United States
    where would I even begin to learn how to make a homebrew application on 3ds?
     
  5. Magicrafter13

    Magicrafter13 GBAtemp Regular

    Member
    102
    18
    Feb 19, 2017
    United States
    Well for starting, literally just google it. There are a few short tutorials on how to get you started.

    — Posts automatically merged - Please don't double post! —

    @Joel16 You wouldn't happen to know anything about graphics would you?
     
  6. Joel16

    Joel16 Ils ne passeront pas

    Member
    486
    966
    May 8, 2011
    United States
    Doesn't concern you.
    You can how a look at this: https://github.com/devkitPro/3ds-examples/tree/master/graphics
    or if you want to use a third party library you can have a look at SF2D/SFIL samples. (Be warned these libraries are deprecated but they're easier to understand when compared to the cancer that is citro3D).
     
  7. Magicrafter13

    Magicrafter13 GBAtemp Regular

    Member
    102
    18
    Feb 19, 2017
    United States
    Fair enough, I went to try sf2d once but since it said try citro3d I did... after reading some citro docs I was like f*** it.
     
  8. Magicrafter13

    Magicrafter13 GBAtemp Regular

    Member
    102
    18
    Feb 19, 2017
    United States
    It may be 'easier' but that doesn't mean it's easy. Can we do some PM-ing?
     
  9. Joel16

    Joel16 Ils ne passeront pas

    Member
    486
    966
    May 8, 2011
    United States
    Doesn't concern you.
    I tend to get quite busy tbh, so I wouldn't always be there to answer.
    However you can get help from irc on #Cakey or join the homebrew discord server https://discord.gg/C29hYvh you can get help there.
     
  10. godreborn

    godreborn GBAtemp Psycho!

    Member
    3,551
    666
    Oct 10, 2009
    United States
    never mind. wrong system. lol
     
    Last edited by godreborn, Jul 17, 2017
  11. Magicrafter13

    Magicrafter13 GBAtemp Regular

    Member
    102
    18
    Feb 19, 2017
    United States
    ?
     
  12. smealum

    smealum growing up sucks.

    Member
    635
    2,022
    May 1, 2006
    United States
    SF
    not cancer
     
    MRJPGames, Amaredeus and catlover007 like this.
  13. Joel16

    Joel16 Ils ne passeront pas

    Member
    486
    966
    May 8, 2011
    United States
    Doesn't concern you.
    Wasn't expecting a reply from you of all people.
    However yeah it isn't necessarily cancer, but if you're a newcomer it probably isn't really the best way to start. Probably once you get the hang of sf2d or just using gfx framebuffers themselves, you'd be able to make the switch.
     
  14. Magicrafter13

    Magicrafter13 GBAtemp Regular

    Member
    102
    18
    Feb 19, 2017
    United States
    Who would have thought the Man himself would be over here reading our silly questions.
     
    Joel16 likes this.
  15. trainboy2019

    trainboy2019 GBAtemp Advanced Fan

    Member
    GBAtemp Patron
    trainboy2019 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    796
    218
    Oct 6, 2015
    Antarctica
    Ylisse
    How would I use a gif in homebrew?
     
  16. catlover007

    catlover007 GBAtemp Regular

    Member
    169
    194
    Oct 23, 2015
    Germany
    you probably mean an animated one, don't you?

    The easist way is to simply unpack the image into single frames and then use them in your program. An alternative would be to use a library(like this one: https://github.com/hidefromkgb/gif_load), if you want to load the gifs from the internet or from file and you can't prepare them. But in the end you have to unpack the gif into single frames(whether you're doing it on the fly or in advance) and then proceed as if you're drawing an animated sprite.
     
    trainboy2019 and Joel16 like this.
  17. Magicrafter13

    Magicrafter13 GBAtemp Regular

    Member
    102
    18
    Feb 19, 2017
    United States
    I need help, this isn't necessarily 3ds related, more of c++ in general, but since the software is for the 3ds I figure I might as well go here anyway.
    In the file MaVeRo-3D.cpp (the main file) [see repo: https://github.com/Magicrafter13/MaVeRo-3D] I can't figure out what's wrong, but after a few hours I was able to deduce it had something to do with the sprite_init arrays.
    The problem is at line 286. If I comment it out, the program runs fine, but with it, the 3ds will crash. I have figured out it is the R3 G3 B3 and A3 arrays that are causing it in some way. Because I can still use the test_tile_sprite object fine with the other arrays, but not the 3rd set. I have no idea what's wrong and even with extensive googling I have not been able to even figure out the problem!
     
  18. Magicrafter13

    Magicrafter13 GBAtemp Regular

    Member
    102
    18
    Feb 19, 2017
    United States
    I'll try anyone's suggestions, but while I wait I'm going to try and learn how to use std::vector.... yes I said learn. [Hey everybody's gotta learn at some time :/]
     
  19. yerWizard

    yerWizard Member

    Newcomer
    29
    35
    Oct 21, 2016
    Is there a way to get information from uniform variables in the vertex shader like glGetActiveUnform()?;
     
  20. Magicrafter13

    Magicrafter13 GBAtemp Regular

    Member
    102
    18
    Feb 19, 2017
    United States
    I'm having some kind of issue, printing some lines, it seems like a while loop type symptom.. but it's not...
    https://github.com/Magicrafter13/MaVeRo-3D
    in the main file (MaVeRo-3D.cpp) at line 477 I have a for loop which is supposed to draw some tiles, it gets to the end (prints drawing: 69, which is the end of the for loop obviously) but then it freezes. If I had some cout's in the drawing function it just prints text forever, I don't know why it's getting stuck, since it should draw the 69th one, and then set I to 70, thus ending the for loop. But I think it may have something to do with my use of vectors, since I am new to them, and probably messed something up.

    — Posts automatically merged - Please don't double post! —

    If I change the number from 70 to 69 in the for loop, it freezes at 68. So I assume, that it always freezes at the last one, which just confuses me even more.

    — Posts automatically merged - Please don't double post! —

    EDIT: I changed it to 1, and it doesn't lock up, but it doesn't draw the first tile either... but I suppose I can figure that out later. The main problem right now, is what's wrong with this for loop...

    edit 2: if it's 3 or higher then it freezes. But 2 and 1 work (and probably 0, but that would be pointless).
     
    Last edited by Magicrafter13, Jul 27, 2017