Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Pony OS PC (Running Pony Net)
   
Award
Favorite
Favorited
Unfavorite
Vehicles: Creative
Microcontrollers: Microcontroller
Tags: v0.10.32
File Size
Posted
433.256 KB
25 Jul, 2020 @ 6:22am
1 Change Note ( view )

Subscribe to download
Pony OS PC (Running Pony Net)

In 1 collection by CrazyFluffyPony
Pony Net
3 items
Description
Content
Pony Net

Pony OS
  1. Introduction
  2. App/Window manager
  3. Keyboard and Mouse
  4. Network manager
  5. Multiplayer warnings

Pony Net
Pony Net is the network system behind Pony OS, please check the description here.

Pony OS
Pony OS is the software running on every computer.
It provides system services (dhcp configuration, window/app manager, network manager, keyboard & mouse).
Multiple Apps can run on the same Pony OS. The OS will control when an app can send data to the network, which app is drawn on the screen, and which app receives data from keyboard and mouse.
Every app can read all the data coming from the network, every app must filter the data (depending on the port).

You can create your own app for Pony OS, but it will not be very easy, i can promise. But i hope someone will be able to do it!


App/Window Manager
In the window/app manager, you can add your app. This will create a button on the desktop with the defined label and color.
{"Mesg. Centr",r=50,g=187,b=227},

Keyboard and Mouse
The keyboard data and the touchscreen data is sent to the currently open app via a single number (channel 31).
If the keyboard is open, your app will not receive any touchscreen information.

NOTE: The touchscreen data only supports unmodded monitor sizes! if the monitor is higher or wider then 2047 pixels, it will crash)

You can use a provided function to convert that number back into a lua table including all the information you need:
keyboard = parseKeyboard(input.getNumber(31)) keyboard = { type = boolean, -- only for internal use keyboardShown = boolean, -- true = keyboard is currently visible on the screen click = boolean, -- user is currently performing a click (equals to "isPressed1 = input.getBool(1)"" on a directly connected touchscreen) x = number, -- x coordinate of the click y = number, -- y coordinate of the click key = number, -- the ASCII keycode if a button was pressed (0 if non was pressed) char = string, -- the string representation of the pressed button (empty i non was pressed) CONFIRM = boolean, -- true if someone pressed the "enter/send/confirm" button DEL = boolean -- true if someone pressed the "delete/backspace" button }

They keyboard will automatically close if someone clicks outside of the keyboard (upper half of the screen).
You can tell the keyboard to hide (send boolean pulse on output composite channel 32) or to show (send boolean pulse on output composite channel 31).

Network manager
The network manager controls which app is allowed to send data onto the network. If you are allowed to send data, composite input boolean channel 31 will be true.
If you send packets even you are not allowed to, the packets will be droped.

By default, the network manager allows an app to send for 10 ticks, then the next app is allowed, then the next ... until its your turn again.

Every app receives all incoming packets. The only information that is overwritten is number channel 31 (the receiver MAC adress).

Multiplayer warnings
No synchronization is guaranteed.
If a player joins a server with an existing computer, he will probably see different things then the other players.
The data they receive via Pony OS is still synchronized.
Rule of thumb: the simpler your app is, the better is the synchronization!




Creating your own app
You can create your own apps for Pony OS.
The App "Live Click" is already like an example,
and you can have a look at this example App which uses the keyboard to write text to a variable.


You can always ask me for help on Discord.
CrazyFluffyPony#0587





7 Comments
goog 25 Sep, 2023 @ 7:49am 
amazong:steamhappy:
76561198192726397 30 Sep, 2022 @ 5:46am 
amazing
CrazyFluffyPony  [author] 31 Jan, 2021 @ 9:37am 
He luke, sorry i closed the discord after i leaft stormworks behind. But if you have questions you can still contact me directly, added my tag instide of the discord server link
luke 30 Jan, 2021 @ 3:03pm 
how can i join the server
CrazyFluffyPony  [author] 24 Dec, 2020 @ 3:59am 
There should be multiple lua scripts on the very top of the microcontroller.They contain the code for the pony logo and the rotating circles.
ColonialLobster 23 Dec, 2020 @ 2:12pm 
How do you change the startup screen?
Lachyness 28 Jul, 2020 @ 12:09pm 
HOLY CRAP!!