Can a game take information from the internet?

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
DFlimbingo
Newbie
Posts: 24
Joined: Wed Mar 24, 2021 2:37 am
Contact:

Can a game take information from the internet?

#1 Post by DFlimbingo » Tue Nov 09, 2021 8:36 pm

I know this is a long shot, but I'm curious if I can have my Ren'Py game take information from a website and display it in the game. For example, if the user types in their username on Twitter, can Ren'Py then search for that specific name and return the amount of followers? I know its possible for Ren'Py to collect some Steam information, but I know that's sort of a special case.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Can a game take information from the internet?

#2 Post by Imperf3kt » Wed Nov 10, 2021 1:06 am

Depends.
This should do the trick
https://www.renpy.org/doc/html/config.h ... n_callback

But I'm not entirely sure how to use it to get things like number of twitter followers etc.

You may need to make a bot that scrapes the information from an API and saves it to a file that renpy can read.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

Post Reply

Who is online

Users browsing this forum: Google [Bot]