Tutorial How to make 3DS Games with Unity

  • Thread starter Thread starter Keksfresser
  • Start date Start date
  • Views Views 227,846
  • Replies Replies 532
  • Likes Likes 31

Should I add some Demo Projects?


  • Total voters
    54
  • Poll closed .
Gonna answer: Yes and no.

Has anyone managed to use some of the New 3DS buttons, such as the right circlepad, ZR, and ZL?
For the new 3ds buttons, you need to have it set as target. Then you can use the regular API:
C#:
GamePad.GetButtonTrigger(N3dsButton.ZL);
GamePad.GetButtonTrigger(N3dsButton.ZR);

Regarding the right stick and the Select button, I haven't got them working.

The API exposes CirclePadPro, and I thought it would read it and the New 3DS buttons in the same way, but apparently not.

I would try to use GamePad.GetButtonTrigger(N3dsButton.Emulation_R_Right/Left/Down/Up); and manually converting that to Vector2. If that doesn't work, my second option would be enabling in Player Settings the ExtraPad toggle. ExtraPad should be the CirclePadPro, as it's mentioned like that in the Nintendo World documentation, but it may work with the N3DS stick.
 
Alright, thanks! Also do you know what could cause a camera to be zoomed in?
what do you mean? There's no difference at all in camera setup from any other platform (excepting the stereoscopic 3d which does not zoom nor anything). Check your depth of field.
 
@MG4M3R select button is disabled by default by the SDK. You can enable it through a Native Plugin. I also got the camera and photo selector working as well!

IMG_6841.jpeg



Edit: I can also confirm that Gamepad.CirclePadPro works for the right stick of the N3DS.
 
Last edited by Manurocker95,
@MG4M3R select button is disabled by default by the SDK. You can enable it through a Native Plugin.

Edit: I can also confirm that Gamepad.CirclePadPro works for the right stick of the N3DS.

Can you give me a clue to what I should research to find more about this Native Plugin?
 
Can you give me a clue to what I should research to find more about this Native Plugin?
Import the native plugin example to have the C++ template project and read the ctr sdk documentation. There’s a func to enable debug mode:

1769259148930.png


And you probably need to keep "Development build" when building the cci.
 
Last edited by Manurocker95,
hey, hey, today I got real time shadows to be implemented in Unity. Not a good performance as 5K polys drops the framerate to 45fps but so far, so good!

dlf9ex0-8bf0e418-ef3c-46d7-83ba-25a0405b87c3.gif
untitled_by_hydregonart_dlfi72e-414w-2x.jpg


Citro3D has support for shadow mapping, which seem impossible in Unity so I made simple planar shadows that are completely CPU bound but it works, at least.
 
Hey everyone, it's been a bit since I posted in this thread but I think this is very interesting and potentially opens the door to a lot of new things, more specifically, the possibility of greatly expanding functionality and features for Unity 3ds

I managed to create a native plugin for my project using devkitpro, I only made it a basic test for reading and writing to the SDMC without needing to make it a development build (granted, I still need to fix reading, but writing works very well)

Example:
1770828264184.png


I have yet to try more features, but I think this is a really good step forward
I might make a separate thread for this once I understand a bit better how to do this and be able to explain it so others can do it as well
 
Hey everyone, it's been a bit since I posted in this thread but I think this is very interesting and potentially opens the door to a lot of new things, more specifically, the possibility of greatly expanding functionality and features for Unity 3ds

I managed to create a native plugin for my project using devkitpro, I only made it a basic test for reading and writing to the SDMC without needing to make it a development build (granted, I still need to fix reading, but writing works very well)

Example:
View attachment 556282

I have yet to try more features, but I think this is a really good step forward
I might make a separate thread for this once I understand a bit better how to do this and be able to explain it so others can do it as well
Any breakdown regarding that? I got photo selector to work but as photos are stored in the SD, Development builds are required and I can’t properly access the data. I’d like to read the byte stream from sdmc path :)

Edit: and kinda offtopic, @CooingMaxito, I’m making a new game for N3DS and the main menu works just fine on new 3ds but only in that scene, the old3ds gets out of memory and crash. I’m using ciaforgex to enable the 80mb ram but should I also set 80 in Project settings? everytime I change the 16mb value from there, the game doesn’t open at all…
 
Any breakdown regarding that? I got photo selector to work but as photos are stored in the SD, Development builds are required and I can’t properly access the data. I’d like to read the byte stream from sdmc path :)

Edit: and kinda offtopic, @CooingMaxito, I’m making a new game for N3DS and the main menu works just fine on new 3ds but only in that scene, the old3ds gets out of memory and crash. I’m using ciaforgex to enable the 80mb ram but should I also set 80 in Project settings? everytime I change the 16mb value from there, the game doesn’t open at all…
I'm currently writing a basic guide to follow for being able to do this, it’s actually pretty straightforward once you know what to do. I’ll make it a thread and will also post it on this thread so that it’s a bit more accessible

As for your game, when you change the memory in player settings it’s almost guaranteed to break, not much we can do about that unfortunately

My only advice is to try and see what is causing so much memory being used on your menu, and optimize it a bit for it to be able to run on o3ds
 
I'm currently writing a basic guide to follow for being able to do this, it’s actually pretty straightforward once you know what to do. I’ll make it a thread and will also post it on this thread so that it’s a bit more accessible
noice! Please, tag me when ready! I’m interested :)

As for your game, when you change the memory in player settings it’s almost guaranteed to break, not much we can do about that unfortunately

Modifying the rsf actually gives you more ram to be used or its just like “you have permission to set this”? Because I definitely need to use more than 16mb 😅
 
Modifying the rsf actually gives you more ram to be used or its just like “you have permission to set this”? Because I definitely need to use more than 16mb 😅
So basically, in the rsf what we do is change the system mode into extended memory, for n3ds this doesn’t do much because it can handle it a lot better, but for o3ds for example, changing the system mode to 80mb makes the system turn off a bunch of services, including the home menu and such to have more free memory to use in your game

When in this mode, it’s necessary to reboot the system to go into this mode when opening and closing the game to stop/start the services, that’s why on o3ds sometimes it takes a really long time to boot up or close the game. You can try it by opening up a normal game, and then comparing the boot time trying to open something like Smash Brothers or Pokemon Sun and Moon
 
So basically, in the rsf what we do is change the system mode into extended memory, for n3ds this doesn’t do much because it can handle it a lot better, but for o3ds for example, changing the system mode to 80mb makes the system turn off a bunch of services, including the home menu and such to have more free memory to use in your game

When in this mode, it’s necessary to reboot the system to go into this mode when opening and closing the game to stop/start the services, that’s why on o3ds sometimes it takes a really long time to boot up or close the game. You can try it by opening up a normal game, and then comparing the boot time trying to open something like Smash Brothers or Pokemon Sun and Moon
I understand that but the regular CTR should have at least 64MB of RAM for application, so setting the extended mode, should let you change the values in project settings, but changing that makes it go crazy. I don't get the point then of having the extended memory active if you can't actually use that memory.
 
I understand that but the regular CTR should have at least 64MB of RAM for application, so setting the extended mode, should let you change the values in project settings, but changing that makes it go crazy. I don't get the point then of having the extended memory active if you can't actually use that memory.
Setting the extended mode already lets you use up to 80mb on the built game, you don't need to change the project settings

You can confirm the system mode your build uses by using ctrtool

Also I finished writing a basic guide for the plugins thingy
https://gbatemp.net/threads/integrating-devkitpro-for-native-plugins-in-unity-3ds.679666/
 
hey, hey, today I got real time shadows to be implemented in Unity. Not a good performance as 5K polys drops the framerate to 45fps but so far, so good!

dlf9ex0-8bf0e418-ef3c-46d7-83ba-25a0405b87c3.gif
untitled_by_hydregonart_dlfi72e-414w-2x.jpg


Citro3D has support for shadow mapping, which seem impossible in Unity so I made simple planar shadows that are completely CPU bound but it works, at least.
I'm really curious to know more about this implementation of shadow mapping im Unity, since I'm struggling myself with pseudoshadow casting methods. I personally just made a script and a shader that just flattens a mesh filter/skinned mesh to the ground, deforms it against the light source and then tries to conform it to the terrain/other gameobjects's surface. Works fine but real shadow maping would be nice honestly 😅
 
I'm really curious to know more about this implementation of shadow mapping im Unity, since I'm struggling myself with pseudoshadow casting methods. I personally just made a script and a shader that just flattens a mesh filter/skinned mesh to the ground, deforms it against the light source and then tries to conform it to the terrain/other gameobjects's surface. Works fine but real shadow maping would be nice honestly 😅
As I mentioned, that is also the approach I ended doing as well. I implemented a custom shadow map by having a camera rendering the casting models and calculating the shadows from the generated render textures. However, I could see the results on the editor but not on retail hardware as shaders are automatically changed to default vertex lit ones. So no luck there… maybe now that we know we can access devkitpro stuff we can calculate the shadows and get the result back to Unity. I found this pull request from devkitpro’s example repo about the shadowmapping. Seems not accepted yet, but it works at 60 fps on Old3DS (my approach reaches 25 with 5k polys): https://github.com/devkitPro/3ds-examples/pull/69

image.png
 
Last edited by Manurocker95,

Site & Scene News

Popular threads in this forum