Social Media Suport In Game

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
neometalero
Regular
Posts: 196
Joined: Sun Oct 23, 2016 3:51 am
Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Deviantart: neometalero
Contact:

Social Media Suport In Game

#1 Post by neometalero »

Hi! I would like to know if there is any social media support in Renpy :!: :?: , I haven't been able to find anything about it. I want my users to be able to share images and/or text on social media, from inside my games. Tks!
Working on many weird narrative games at Curse Box Studios
Image
https://www.curseboxstudios.com/

User avatar
qirien
Miko-Class Veteran
Posts: 541
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
itch: qirien
Location: New Mexico, USA
Discord: qirien
Contact:

Re: Social Media Suport In Game

#2 Post by qirien »

I was looking for this, too! Even if it were something as simple as taking a screenshot and then sharing...
Finished games:
Image
Image
Image

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Social Media Suport In Game

#3 Post by gas »

I think that is quite difficult to implement due the continual change in the API of such social networks, and also can pose some issue on cookie laws for Renpy Web (not speaking some issue on artist credits). Such function could probably force to continual updates and break games on a daily basis!

You can use a normal URL link to direct the user on a social profile, and there use that media tools for sharing.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
qirien
Miko-Class Veteran
Posts: 541
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
itch: qirien
Location: New Mexico, USA
Discord: qirien
Contact:

Re: Social Media Suport In Game

#4 Post by qirien »

I was thinking more for Android/iOS games where "sharing an image" appears to be something any app can do to pass data to another app.
Finished games:
Image
Image
Image

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Social Media Suport In Game

#5 Post by gas »

Same problem. Such phone apps and the very OS are continually updated when the API change (probably the very next hours!).
There's no native engine for that for the above reasons. Is not only sending an image, is the transfer protocol (the internal way of "sharing") that entirely change, while you as the user see nothing of it.
It CAN be done, but integrating a social sharing function in the core means breaking all games for older releases, even those that doesn't want to link on an external resources.

The reply is: renpy natively can't. You can with python, but the burden is on your shoulder. That's mean you should integrate a pyhton facebook API on your own (good luck!) and mangle the core a bit, and also allow for continual updates when that API change (and Facebook is infamous to make strange and even breaking updates). Not speaking Twitter is even worst.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: Social Media Suport In Game

#6 Post by xavimat »

That said, you can make renpy read and send things to a web page and maybe have that web (not renpy) do the sharing with social media.
It's possible to use urllib2 inside renpy to send and read info from a php page.
That php can make lots of things, like send automatic emails and update a database.
I don't know about the social sharing, but it should be doable with php.


EDIT:
This example code will share some info in twitter from renpy:

Code: Select all

textbutton "Share on twitter" action OpenURL("http://twitter.com/share?text=Hey guys, I've reached Ending 4 “You're magnificient” in the fantastic game “Praise Yourself”&url=https://praiseyourself.com")
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
qirien
Miko-Class Veteran
Posts: 541
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
itch: qirien
Location: New Mexico, USA
Discord: qirien
Contact:

Re: Social Media Suport In Game

#7 Post by qirien »

Actually, it looks like I might be able to do this with Jnius
https://github.com/kivy/pyjnius
as stated on this thread:
viewtopic.php?p=461111#p461111
Finished games:
Image
Image
Image

Post Reply

Who is online

Users browsing this forum: Kocker