Stormworks: Build and Rescue

Stormworks: Build and Rescue

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

Subscribe to download
WORKING WEB BROWSER inside Stormworks

In 1 collection by Guðleifr
Stormworks Connect
5 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.
59 Comments
Guðleifr  [author] Jan 22 @ 1:12pm 
I guess when they added http support to lua they knew someone would do it. So it's still Stormworks)
DIO Jan 22 @ 12:51pm 
this isn't even fucking stormworks anymore
JAguar Jan 5 @ 11:55am 
thats enough for me
Guðleifr  [author] Dec 21, 2024 @ 5:54pm 
Only in text format 😂
OceanicNote7609 Dec 21, 2024 @ 12:53pm 
Can i watch fortnite porn on this serious question.
Guðleifr  [author] Nov 10, 2024 @ 11:22am 
It works and it's been tested by several thousand people. Obviously, you're doing something wrong.
blue and white star line Nov 10, 2024 @ 11:12am 
DOES NOT WORK
Fursen Oct 13, 2024 @ 12:50pm 
nvm i didnt needed a query
Guðleifr  [author] Oct 13, 2024 @ 10:42am 
I didn't even think about it. You really can)
Noobs_sammy Oct 13, 2024 @ 10:38am 
oh god this is so cool
finally game where i can google tutorial without exiting the game:steamthis: