Would it be possible to do something like having websockets in Factorio?
I think it would be really cool to write a mod that connects to a service that has that and have it come back and do things in the game itself based on what the socket server says.
I have some ideas but i don't know if its possible.
Websockets?
-
- Inserter
- Posts: 21
- Joined: Mon Nov 17, 2014 3:53 pm
- Contact:
Websockets?
This is my Signature. There are others like it but this one is mine.
Re: Websockets?
They have said they will not be putting sockets in the game as it breaks determinism. To me thats unfortunate as I feel as long as you don't perform any changes to the game state it should be fine and the amount of cool mods you could make with them would make it worthwhile. That being said you can write to a file and read the output and have a separate program pick up the output . and send it over websockets.
I did actually make something called FactorIO (on github) which was able to wrap the client and server and run arbitrary lua and access the result. Eg. so you could get data out to send over a socket without intermediate files.
I did actually make something called FactorIO (on github) which was able to wrap the client and server and run arbitrary lua and access the result. Eg. so you could get data out to send over a socket without intermediate files.
Last edited by Plorntus on Sat Jul 22, 2017 2:55 pm, edited 2 times in total.
-
- Inserter
- Posts: 21
- Joined: Mon Nov 17, 2014 3:53 pm
- Contact:
Re: Websockets?
Could you link it please? Id really love to check it out.
This is my Signature. There are others like it but this one is mine.
Re: Websockets?
https://github.com/TomCaserta/FactorIONightmareInfinity wrote:Could you link it please? Id really love to check it out.
Unfortunately its more of a proof of concept at the moment. It's not complete but I was planning on working on it this weekend some more.
Here is a video of it: https://www.youtube.com/watch?v=4IS67LTZ6kQ where I serialized the game data and wrote it to a file (the file was created by the external application and not factorio.)