dcs-liberation / dcs_liberation

DCS World dynamic campaign.
GNU Lesser General Public License v3.0
712 stars 185 forks source link

Feature request: web gui #104

Open chappyj opened 4 years ago

chappyj commented 4 years ago

Exploring the idea of an alternative ui web app to run dcs liberation remotely and collaboratively with other users. Multiple users could flight plan and make operational changes via the web gui, resulting miz creation could enable play on dedicated servers that are hosting the web server also

Khopa commented 4 years ago

I agree that this would be cool. But this would also basically mean re-starting from scratch.

I originally considering doing a web based app at some point. But this being a desktop app make it rather simple to install and use for single player.

It could a "desktop webapp", with electron or something similar. But I think you'd also have to either entirely rewrite pydcs (the library i use to generate mission file) in order to get a js library able to generate DCS mission file, OR find a way to call python pydcs code through electron/js. Or else have a separate Python server that handle the job, but that would be much overhead... Which is why i gave up on this idea and went for a straightforward Python QT app (i was also starting from shdwp original code, which made it easier to iterate).

It's true that this being a webapp would have its perks though. I don't deny it. It would be much easier to develop and customize UI, and we could use leaflet.js to display nice maps and stuff like that...

But this would be such a big rework of the project, for me it's a bit out of scope for DCS Liberation. It would be an entirely new project.

HomeFries94 commented 3 years ago

Here's a "mountain to Mohammed" question:

If the point is collaboration, then instead of a web interface, would it be possible to add code to "import" a save game from a client (who edits his flight) and just allow the host to choose which changes to apply? I know it's a different type of coding altogether, and I don't know whether Python's parsing algorithms are up to the task, but it's worth asking.

DanAlbert commented 3 years ago

That sounds incredibly error prone. We want a new UI framework for other reasons anyway.

HomeFries94 commented 3 years ago

No problem. Just a brainstorm.

Canadave-eh commented 3 years ago

How about an interim solution of just exporting key campaign details to a specified discord channel (or in an easily postable format).

wartech0 commented 1 year ago

I have a very rudimentary web-gui setup on my branch I am working on using react as a front end. I plan on adding an authentication system and giving specific users authority over the game/squadron based on configuration.

DanAlbert commented 1 year ago

How are you going about that? We already have a react app within the Qt app. We do have a plan for this that's been in progress for a while, it's just a thing that takes years. The plan is to continue moving more of the existing UI into the part that's already react, and once we're done, jettison Qt and replace it with electron (with a configurable backend that defaults to localhost).

A mistake we need to avoid repeating though: the UI needs tests. It's historically the most error prone part of Liberation and is resistant to tools to catch even the most obvious bugs (type checking). The map (the one part that is currently react) is quite a bit better tested than the rest, and tbh I wasn't planning on any more changes to that part of the UI until coverage is closer to 100% (at least, any new components ought to have tests).

If you want to tackle this, definitely do it it incrementally like that.

wartech0 commented 1 year ago

Right now I got a basic example working alongside the current UI but its very very rudimentary, I'll continue working on it and I'll write tests for new components as well. I'm trying to avoid anything that will affect the functionality of the current qt / map stuff.

DanAlbert commented 1 year ago

I'm trying to avoid anything that will affect the functionality of the current qt / map stuff.

I think that's exactly what you need to do though :) How are you planning to land this otherwise?