Weird idea: Websocket Server to interact with the game
Posted: Mon Jan 29, 2018 2:42 pm
I had an idea that is, well, somewhat out of mind.
I am generally a passionate web developer with focus on cutting edge technologies and abstract ideas.
I wanted to create a mod that can interact with the game dynamically and that is able to control everything in-game from just a website.
What i had in mind was
- Create a mod that implement a lua websocket server. Well, isn't possible, i tried it. So it must be done by game devs directly.
- Let the websocket server trigger and submit all events so i am able to connect to the game and interact with it (via website websocket client basically)
- Play factorio completely script based - I modify my website scripts, reload the website and see if all work out as expected
So this way, i thought, i will have fun in a completely different way with factorio.
Create the best scripts and possible to program a complete play-through, script based, with just the use of javascript and websocket communication.
I think this would be a whole new challange, albeit it's for a small portion of the playerbase.
Just to imagine what i mean
- Factorio send event "on_player_mined_item" to websocket client (the website script that is connected with factorio).
- The website script check for this event, do something and send to the server "walk_player(x,y)".
- In-Game now the user walk to (x,y)
Or, if you think further, you can enhance factorio even more by your complete own tactics, helpers, charts, from just a website (local or online, it doesn't matter).
Let's think about having opened factorio on monitor 1 + on monitor 2 you have opened a screeen that show your current production stats or something like that.
So many ideas that comes to my mind. Let's call if "factorio pro tools"
I know, an idea out of any scope. Maybe the devs are also crazy and have an ear for this idea
IMHO it is not that complecated to add some support for that.
The first way just could be: Trigger and listen for everything what LUA events already do but just also for the websocket.
C++ servers are enough available.
Factorio than just listen to something like: "localhost:6666" and you are able to connect to it.
Ok, i stop dreaming here
I am generally a passionate web developer with focus on cutting edge technologies and abstract ideas.
I wanted to create a mod that can interact with the game dynamically and that is able to control everything in-game from just a website.
What i had in mind was
- Create a mod that implement a lua websocket server. Well, isn't possible, i tried it. So it must be done by game devs directly.
- Let the websocket server trigger and submit all events so i am able to connect to the game and interact with it (via website websocket client basically)
- Play factorio completely script based - I modify my website scripts, reload the website and see if all work out as expected
So this way, i thought, i will have fun in a completely different way with factorio.
Create the best scripts and possible to program a complete play-through, script based, with just the use of javascript and websocket communication.
I think this would be a whole new challange, albeit it's for a small portion of the playerbase.
Just to imagine what i mean
- Factorio send event "on_player_mined_item" to websocket client (the website script that is connected with factorio).
- The website script check for this event, do something and send to the server "walk_player(x,y)".
- In-Game now the user walk to (x,y)
Or, if you think further, you can enhance factorio even more by your complete own tactics, helpers, charts, from just a website (local or online, it doesn't matter).
Let's think about having opened factorio on monitor 1 + on monitor 2 you have opened a screeen that show your current production stats or something like that.
So many ideas that comes to my mind. Let's call if "factorio pro tools"
I know, an idea out of any scope. Maybe the devs are also crazy and have an ear for this idea
IMHO it is not that complecated to add some support for that.
The first way just could be: Trigger and listen for everything what LUA events already do but just also for the websocket.
C++ servers are enough available.
Factorio than just listen to something like: "localhost:6666" and you are able to connect to it.
Ok, i stop dreaming here