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: 109
Joined: Sun Oct 23, 2016 3:51 am
Deviantart: neometalero
Contact:

Social Media Suport In Game

#1 Post by neometalero » Wed Jan 01, 2020 12:31 pm

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 My Dream Sport Dating Simulator
Image
Image

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

Re: Social Media Suport In Game

#2 Post by qirien » Mon Jan 27, 2020 2:45 pm

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
In progress: Our Personal Space 2: Space to Grow

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

Re: Social Media Suport In Game

#3 Post by gas » Tue Jan 28, 2020 7:50 pm

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.
10 ? "RENPY"
20 GOTO 10

RUN

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

Re: Social Media Suport In Game

#4 Post by qirien » Tue Jan 28, 2020 9:51 pm

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
In progress: Our Personal Space 2: Space to Grow

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

Re: Social Media Suport In Game

#5 Post by gas » Wed Jan 29, 2020 9:31 am

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.
10 ? "RENPY"
20 GOTO 10

RUN

User avatar
xavimat
Eileen-Class Veteran
Posts: 1438
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: xavimat
Location: Italy
Contact:

Re: Social Media Suport In Game

#6 Post by xavimat » Wed Jan 29, 2020 2:36 pm

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!
Cops&Robbers A two-player experiment
Fear&Love Why can’t we simply express our feelings? Why am I afraid to say ‘I love you’?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Post Reply

Who is online

Users browsing this forum: Google [Bot]