programming on ds/3ds?

Discussion in '3DS - Homebrew Development and Emulators' started by natanelho, Aug 29, 2015.

  1. natanelho
    OP

    natanelho GBAtemp Maniac

    Member
    1,390
    360
    Apr 25, 2015
    Antarctica
    Between the Sacred Silence and Sleep
    most of time im separated from my pc, and I thought: is there any way to create standalone homebrews, or just runnable code on ds / 3ds? searched the web and found some things, nothing of which I can use right now:

    1.petit computer - dsiware, no longer avaliable on eshop. even if it was, I dont own dsi nor got any way to pay on eshop.

    2.its new version for 3ds - ''smilebasic" only in japanese eshop. again, I dont have any way to pay, nor my console is japanese.

    3. "xds gamemaker" http://dsgamemaker.com/ dsgmforum/viewtopic.php?f=14&t=2851
    the download is no longer avaliable.

    so my questions are:
    1. is there anything I can use with my hardware thats described in the description?
    2.did somebody downloaded that xds homebrew and can give me the .nds file?

    btw sorry for my bad english
     
  2. Jwiz33

    Jwiz33

    Banned
    2,654
    1,523
    Jun 5, 2014
    United States
    in the illuminati headquar—I have said too much!
    Lpp-3ds is what I use, it is great for beginners(like me), and doesn't require any programs to be on your PC.
    EDIT: There is also a LUA interpreter for nds http://gamebrew.org/wiki/Micro_Lua_DS
     
    Last edited by Jwiz33, Aug 29, 2015
  3. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,509
    6,105
    Apr 20, 2015
    United States
    Tigard, OR
    Lua Player Plus for 3DS is the best place to start. Lua is an easy to pick up programming language used in other games as well, like Roblox and (I think) WoW.

    If you decide to try it out, put lpp-3ds.3dsx (or whatever you call it) and index.lua in the same folder.

    Here's a sample script I created just for this!
    Code:
    avatar = Screen.loadImage(System.currentDirectory().."/ihaveamac.png")
    while true do
        Screen.waitVblankStart()
        Screen.refresh()
    
        Screen.debugPrint(10, 10, "Hello GBAtemp", Color.new(158, 158, 255), TOP_SCREEN)
    
        Screen.debugPrint(10, 25, "lpp-3ds is a great way to begin creating", Color.new(158, 255, 158), TOP_SCREEN)
        Screen.debugPrint(10, 40, "simple homebrew projects.", Color.new(158, 255, 158), TOP_SCREEN)
        Screen.drawImage(20, 10, avatar, BOTTOM_SCREEN)
    
        -- exit if the B button is pressed
        pad = Controls.read()
        if (Controls.check(pad, KEY_B)) then
            System.exit()
        end
    
        Screen.flip()
    end
    
    The final result would be...
    This!
     
    Hawxx, Philip3ds and Jwiz33 like this.
  4. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,670
    21,708
    Sep 13, 2009
    Poland
    Gaming Grotto
    Just use bog-standard devkit Pro, libnds has everything you need. If you're looking for something more "Lite", use DS Game Maker - I suggest version 5.12 since the latest one is a tad buggy, hit me up via PM if you have any setup problems. Your barebones minimum for launching DS homebrew is a flashcart or a compatible WLAN card (limits homebrew size to 4MB since there's no other storage but RAM), on the 3DS you can use Homebrew Channel via tubehax, ironhax or a bunch of other exploits.
     
    ihaveamac likes this.
  5. natanelho
    OP

    natanelho GBAtemp Maniac

    Member
    1,390
    360
    Apr 25, 2015
    Antarctica
    Between the Sacred Silence and Sleep
    I hate lua! its my most hated programming language!

    im interested in programming, but as I said I dont have access to pc.
     
  6. Jwiz33

    Jwiz33

    Banned
    2,654
    1,523
    Jun 5, 2014
    United States
    in the illuminati headquar—I have said too much!
    This is actually will be a good reference to look to when I need help in LUA, thanks!
    :blink: Why?
     
    ihaveamac likes this.
  7. Philip3ds

    Philip3ds GBAtemp Regular

    Member
    183
    42
    May 13, 2015
    I need some help. I have lpp-3ds, but I can't find the program itself.
     
  8. sarkwalvein

    sarkwalvein More coffee, please!

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

    Our Patreon
    5,425
    5,848
    Jun 29, 2007
    Germany
    Niedersachsen
    Deal with it man, you are asking for things that wouldn't require a PC to compile them.
    If you suggested using smilebasic you are in no position to bad mouth Lua.

    PS: Dsgamemaker requires a PC.
     
    Jwiz33 and ihaveamac like this.
  9. dfsa3fdvc1

    dfsa3fdvc1 GBAtemp Regular

    Member
    215
    94
    Jan 3, 2015
    Albania
    What problem do you have. I originally wasn't a fan of it (Lua's FOR loops just look wrong to me) but after I started learning more about it I really liked it. I find it a lot easier to handle its hetero tables. There's awesome stuff like easy variable swapping. It's not that bad IMO.
    Just started my Lua project (VNDS 3DS Interpreter for Visual Novels) and I'm more progress using Lua than I ever could have using the other libraries currently available.
     
  10. JoostinOnline

    JoostinOnline Certified Crash Test Dummy

    Member
    10,974
    3,761
    Apr 2, 2011
    United States
    The Twilight Zone
    I taught myself C through Wii homebrew. I haven't been able to do crap on the NDS/3DS though, because the libraries are so very different. Everything is coded in a completely different style.

    That being said, it might be an easy adjustment if you learned C properly, instead of just jumping in the deep end and trying to swim with the last language you learned (Java).

    Then you've never used SCHEME. :rofl2: It was the second language I learned, and I'm glad I did, because it taught me how to think outside the box and use functions for things they weren't intended to get the best performance. However, it was infuriating. I'm a pretty level-headed guy (don't even get angry in video games), but one time I just snapped after several hours of working on a single function for homework, and screamed.
     
  11. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,670
    21,708
    Sep 13, 2009
    Poland
    Gaming Grotto
    LUA is probably the next best thing after actual C, which is not to say that it's a good solution, a good solution would be to buy the cheapest PC you can find and work on that - even a crappy netbook will do. The only alternative I see that isn't BASIC, and BASIC is blerght because we're not in the 80's anymore, would be to code in Java/JavaScript compatible with the 3DS' browser and host your app on a local server.
     
  12. 730

    730 Professional Shitposter

    Member
    465
    377
    Apr 2, 2015
    Argentina
    How are you supposed to code then? With a phone?
     
  13. q9p

    q9p GBAtemp Regular

    Member
    145
    74
    Aug 14, 2015
    United States
    Pensacola, FL
    His brain.
     
    730 and ihaveamac like this.
  14. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,670
    21,708
    Sep 13, 2009
    Poland
    Gaming Grotto
    Technically he can use interpreted languages like BASIC or Lua using the touchscreen as a keyboard, but it's busy work that becomes quite annoying even before you finish your first line of code - you have 10 fingers to operate a nice, big keyboard and only one stylus to operate the touchscreen - typing will obviously be an issue, even with suggestion software etc.
     
  15. 730

    730 Professional Shitposter

    Member
    465
    377
    Apr 2, 2015
    Argentina
    I was being sarcastic but yes, I'd have nightmares after doing something like that.
    Technically, you can also connect a keyboard via Bluetooth or an OTG cable, but then again, it's A PHONE. And if you can afford a phone you can probably afford a very cheap computer too.
     
  16. josamilu

    josamilu GBAtemp Fan

    Member
    383
    213
    Feb 1, 2015
    Gambia, The
    Saturn is better than Jupiter :P
    Actually there was some homebrew which allowed that on DS. No joke, I actually wrote entire, but simple, LUA games with this method on my DS as a kid.
    This should be also possible on 3DS with the needed software, like a text editor (Is there one already?) and an interpreter. But I don't recommend that, it takes ages and is uncomfortable :D

    * Don't take this serious :D * You could also use 3DSBFI to write Brainf*ck code directly on your 3ds :D * *
     
  17. q9p

    q9p GBAtemp Regular

    Member
    145
    74
    Aug 14, 2015
    United States
    Pensacola, FL
    You don't even have to purchase a phone. What he/she could do is purchase a Thinkpad X60 for about $65 (€58) and just install a form of Linux on it. A recommendation would be something that is running a lightweight desktop manager, or alternatively, just get something like Puppy Linux which works out of the box.
     
  18. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,670
    21,708
    Sep 13, 2009
    Poland
    Gaming Grotto
    It was my understanding that he doesn't want to use a phone, he wants to code on the console. Neither the DS nor the 3DS have Bluetooth or a USB port, so no, you can't connect anything to them.
    Oh, I know - Petit Computer was one of them. I still think it's nightmarish though.
     
  19. Jwiz33

    Jwiz33

    Banned
    2,654
    1,523
    Jun 5, 2014
    United States
    in the illuminati headquar—I have said too much!
    There actually was a PC utility that allowed you to code from your PC and make it into a QR code to import it to the DSi. Made using the app/game/whatever usable.
     
  20. Foxi4

    Foxi4 On the hunt...

    pip Reporter
    23,670
    21,708
    Sep 13, 2009
    Poland
    Gaming Grotto
    Oh? Sounds convenient, however it probably required some form of server running in the background or internet connectivity seeing that QR codes don't store a lot of data. Still, it's a solution, at least. :D