Homebrew RELEASE Ren'Py port to Nintendo Switch

Copycat_

Member
Newcomer
Joined
Sep 29, 2018
Messages
5
Trophies
0
Age
36
XP
122
Country
United Kingdom
After countless hours of me being stupid, I got DDLC to launch. However, there is no joy con support for this game like their is in the "The question". Keyboard and mouse support isn't solid either, as the cursor is invisible and the keyboard does not allow for the ability to type.

Is there any way for a user like me to mess with the Joycon support files, and if not, do you know of a way to fix this issue?
 

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,880
Country
United States
After countless hours of me being stupid, I got DDLC to launch. However, there is no joy con support for this game like their is in the "The question". Keyboard and mouse support isn't solid either, as the cursor is invisible and the keyboard does not allow for the ability to type.

Is there any way for a user like me to mess with the Joycon support files, and if not, do you know of a way to fix this issue?
The game disables the controllers.
To re-enable controller support, make a file like "enable_pad.rpy" and place this in it:
Code:
init 1 python:
    renpy.game.preferences.pad_enabled = True
 

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,880
Country
United States
The next version will support mostly complete libnx bindings.
The bindings are generated by SWIG.

To use the bindings, you need to import the library "libnx".
Code:
import libnx
To initialize a structure, you can use the following syntax:
Code:
clkrstSession = libnx.ClkrstSession()
To access members of a structure, you can use the following syntax:
Code:
service = clkrstSession.s
To access a enumeration, you can use the following syntax:
Code:
libnx.PcvModuleId_CpuBus
To call a function, you can use the following syntax:
Code:
libnx.clkrstOpenSession(clkrstSession, libnx.PcvModuleId_CpuBus, 3)

This feature can be used for mounting game RomFS, creating save data on the system memory, opening a video in the web browser applet (with hardware acceleration), opening the software keyboard applet, and more.

Plans for next version:
Fix memory leaks
Proper mouse support
Proper rumble support

Plans for future version:
Lower memory usage
Export NRO or NSP from Ren'Py Launcher
New renderer API
TJS2 interpreter implementation
Video hardware acceleration (possibly streaming image data from web browser)?
 
  • Like
Reactions: mathew77

fvig2001

Well-Known Member
Member
Joined
Aug 21, 2006
Messages
931
Trophies
1
XP
2,927
Country
Philippines
Is there anyway to fix games that use socket.py since that seems to require a specific library _socket that seems to be inside _socket.lib. I copied the missing files that the game only had pyo of and got it from Python 2.7. I am assuming that this probably needs a Switch targeted version of this file. I can't seem to find renpy-switch-extra-libraries for later versions. I'll try the 1.1 one since it's the only one available on the release page.

Full traceback:
File "options.rpyc", line 17, in script
File "sdmc:/switch/BE/renpy/ast.py", line 914, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "sdmc:/switch/BE/renpy/python.py", line 2008, in py_exec_bytecode
exec bytecode in globals, locals
File "game/options.rpy", line 18, in <module>
File "sdmc:/switch/BE/renpy/loader.py", line 754, in load_module
exec code in mod.__dict__
File "auth.py", line 1, in <module>
File "sdmc:/switch/BE/lib/python2.7/httplib.py", line 72, in <module>
import socket
File "sdmc:/switch/BE/lib/python2.7/socket.py", line 47, in <module>
import _socket
ImportError: No module named _socket

This game was the only one so far I've tested that crashed at the start.

Can't wait for the next version. Is there a way to map the skip button?
 
Last edited by fvig2001,

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,880
Country
United States
Is there anyway to fix games that use socket.py since that seems to require a specific library _socket that seems to be inside _socket.lib. I copied the missing files that the game only had pyo of and got it from Python 2.7. I am assuming that this probably needs a Switch targeted version of this file. I can't seem to find renpy-switch-extra-libraries for later versions. I'll try the 1.1 one since it's the only one available on the release page.

Full traceback:
File "options.rpyc", line 17, in script
File "sdmc:/switch/BE/renpy/ast.py", line 914, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "sdmc:/switch/BE/renpy/python.py", line 2008, in py_exec_bytecode
exec bytecode in globals, locals
File "game/options.rpy", line 18, in <module>
File "sdmc:/switch/BE/renpy/loader.py", line 754, in load_module
exec code in mod.__dict__
File "auth.py", line 1, in <module>
File "sdmc:/switch/BE/lib/python2.7/httplib.py", line 72, in <module>
import socket
File "sdmc:/switch/BE/lib/python2.7/socket.py", line 47, in <module>
import _socket
ImportError: No module named _socket

This game was the only one so far I've tested that crashed at the start.

Can't wait for the next version. Is there a way to map the skip button?
_socket is a C extension. I will integrate it in the next version.

If the button can be mapped in upstream version of Ren'Py, it can also be mapped in the Switch version. You can also connect a USB keyboard to the Switch either via USB-C to USB-A adapter or the dock.
 
  • Like
Reactions: fvig2001

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,880
Country
United States
Plans for next version:
Proper mouse support
Proper rumble support
_socket module support

Plans for future version:
Lower memory usage
Export NRO or NSP from Ren'Py Launcher
deko3d render backend implementation
TJS2 interpreter implementation
Video hardware acceleration (via webActivity?)
 
  • Like
Reactions: stvil and mathew77

CrAZONE

Active Member
Newcomer
Joined
Feb 6, 2020
Messages
27
Trophies
0
Age
29
XP
117
Country
Italy
The game I'm testing simply doesn't start (Umineko: Confession of the golden witch, here's the playthrough and download link: ) and gets me to the home screen (with no crash message). Is there any log I could reference to?
 

CrAZONE

Active Member
Newcomer
Joined
Feb 6, 2020
Messages
27
Trophies
0
Age
29
XP
117
Country
Italy
EDIT: I forgot to transfer all the other files in the sdk archive, now the game is working (surprisingly well). But the 4:3 resolution is stretched to fit the Switch's screen, can it be fixed?
 

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,880
Country
United States
EDIT: I forgot to transfer all the other files in the sdk archive, now the game is working (surprisingly well). But the 4:3 resolution is stretched to fit the Switch's screen, can it be fixed?
Yes, it can be fixed, since Ren'Py supports resolution scaling. I plan to do this in a future update.
 
  • Like
Reactions: CrAZONE

Kotomine Kirei

Well-Known Member
Member
Joined
May 21, 2015
Messages
330
Trophies
0
XP
422
Country
United States
I am sort of confused about this.
Can you play Ren'Py PC games that others made on the Switch with this, or is this only a tool to convert games that you made into nro files for the Switch?

If you can play games that others made with it, do you have to turn the game into an nro to do so?
If you do not have to convert it, how exactly do you use it?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Firefox users be like "look at what they have to do to mimic a fraction of our power."