Stormworks: Build and Rescue

Stormworks: Build and Rescue

44 ratings
WORKING WEB BROWSER inside Stormworks
4
4
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
188.796 KB
14 Jun @ 3:48am
14 Jun @ 4:27am
2 Change Notes ( view )

Subscribe to download
WORKING WEB BROWSER inside Stormworks

In 1 collection by Insp1rerS
Stormworks Connect
4 items
Description
This build, based on two controllers that I created, together with the program that I wrote, allows you to connect the Internet to the game and search and access all sites, reading their contents like a real web browser. This is a full-fledged web browser using the Google search engine with the ability to view the entire text content of each page on the Internet. For a better understanding of what and how it works, watch the video (I worked really hard on it).
https://www.youtube.com/watch?v=bTid7PzwMoY





You can download and study the required application in more detail using this link on a special GitHub repository.[github.com]
Use GitHub releases to download (сlick on the right side of the repository page for the current version and scroll below, there will be an option to download)





Just run the program, then subscribe to the in-game browser page in the workshop. In the list of buildings (vehicles), you will see a corresponding building that contains 2 controllers and a monitor, correctly connected to each other. You can use them separately, just go to the edit menu of one of the controllers and save, but building for a subscription will help you understand how to connect them correctly. Type your query on the small monitor and press EN (Enter), you can also use the BS button to delete entered characters. After pressing Enter, the program will process your request and send a list of 50 answers to your search query to the second controller, which will draw them on the monitor. Use the scroll buttons marked in blue (to the left of the keyboard) to navigate through the list of search results. Touch the desired search result on your monitor to read the contents of that page. The browser only supports text content, so that's what you'll see. Text content is displayed in pieces of approximately 500 characters without breaking words, which can also be scrolled through with the same scrolling buttons, so you can read ALL text content of any page.


Well, how is this really possible? How is it possible to implement a web browser in a game where you can only write code that does not have access to the Internet?

So look at the picture. When you type a query on the keyboard and press the Enter button, the keyboard controller encodes the query in ASCII, then sends it in an http request to the application, and also notifies the web browser controller that a new search query has been sent. The web browser controller goes into wait mode for search results, at which time the program uses Google search to receive results for your request. When all the results are received, the program sends a response to the web browser controller that the search results have been received and at the same time sends the first batch of 3 results. At this moment, the web browser controller goes into the status of viewing search results; it expects either clicks on the scroll buttons, or clicks on the monitor on one of the search results. If one of the scrolling buttons was pressed, the web browser controller sends an http request to the program to receive the other 3 search results depending on the current index of the search results page. If a touch click was made on one of the search results, the controller sends an http request to the program to parse the text content of the search result at a certain index, and at this moment goes into a waiting state. When the parsing is successful, the program breaks it into 500-character pieces so that there are no word breaks, and also converts continuous lines into separate lines to fill more monitor space with text. After this, the program sends a response to the web browser controller that the text is ready to be sent and at the same time sends the first piece of formatted text. The web browser controller takes this piece and displays it on the screen. At this moment, the web browser controller goes into mode for viewing the text content of the page - it expects either a click on the scroll buttons or a new search query, which it can learn about from a signal from the keyboard controller. If one of the scrolling buttons was pressed, the web browser controller sends an http request to the program to receive another piece of text depending on the current index of the text piece of the page content. If a signal is received from the keyboard controller, the current state of the web browser controller is reset and it goes to the initial state where it again expects results from the program. And so on and so forth.



P.S. I used this controller, but very much modified it to suit my needs.

P.P.S. This is a building that consists of the necessary parts for the web browser to work. You can find it in the list of vehicles. To use controllers, go to edit them and save.

If you find any problems, and perhaps even fixed them, send me everything, we will update and improve it.

Do not write to me that the program contains viruses. It doesn't. It is not signed with any certificate, so Windows automatically tells you that installing this application is not recommended. I don't have money to buy certificates.
46 Comments
Insp1rerS  [author] 19 Jun @ 6:14pm 
I hope this item will serve as an inspiration, because I don’t think it’s much use, but what a good example of ideally configured http interaction!
Suprisium 19 Jun @ 2:45pm 
people gonna be freaky with this one
Insp1rerS  [author] 18 Jun @ 10:07pm 
If I make you a YouTube, you won’t use it because:
1. Transferring video to the game will take tens of minutes.
2. There will be no video sound, since sounds can only be transferred to the game from midi format.

I'm making something that will make more sense and is more interesting to me.
vligorouser 18 Jun @ 6:14pm 
make a version that has yt frfr
vligorouser 18 Jun @ 6:03pm 
can you make a separate version that has youtube?
Copilot9442 18 Jun @ 9:08am 
DAYUM
Insp1rerS  [author] 17 Jun @ 11:15pm 
I would like to note that this could have been implemented a long time ago. Apparently in the game people get tired of doing the same thing and they move on to something more “wild”.
DragonFruit 17 Jun @ 9:38pm 
the stuff people make is starting to get wild af
Insp1rerS  [author] 17 Jun @ 8:53pm 
Looks like some people literally can't read. Half a screen above I wrote about certificates.
Togradoty 17 Jun @ 2:45pm 
just cause its not signed doesnt mean it has a virus man