james-atkinson / gs2020

Ground Services 2020 - A ground services addon for Microsoft Flight Simulator 2020
GNU General Public License v3.0
13 stars 3 forks source link

In-game panel #1

Closed scelts closed 3 years ago

scelts commented 3 years ago

Not an issue - enhancement proposal.

Is it possible to compile the frontend as static files, didn't really work much with vue? I'd like to give it a go, to have it as an in-game panel only, without simconnect server, such as https://flightsim.to/file/3181/fspm-vfr-map? Should be easy to convert, as long as it's static files.

My goal is to make a package manager for such apps, so if you wish you can also host it on www.fspm.dev, and I'll make a package manager for the users to keep this updated (and for you in future, to identify-login users and use the shared database)

scelts commented 3 years ago

Ok... I see you are sending events, and this is not supported... I'll check if I can somehow bind it, or that you directly change the corresponding sim variable instead of sending the event.

james-atkinson commented 3 years ago

Yeah since it communicates to the sim via SimConnect it COULD be remotely hosted but that doesn't seem too efficient and a bit of a configuration headache.

scelts commented 3 years ago

I didn't write it well - you do not need remote server at all, this is only to check for the version, and simplifying installing the ingame panels. I mean you run the HTML in-game, reading sim parameters and doing your logic, instead of having an exe file with simconnect that does that for each of the addon you install. Like this: https://www.youtube.com/watch?v=L1EkBedOcYw&t=2s there is no external exe running, and I can read/set all the sim parameters to show the map directly from the sim's internal web interface.

Though, as I mentioned there's still no event handling as in simconnect (you need to directly change sim values, and I don't know the names of all of them, there's no documentation about it).

james-atkinson commented 3 years ago

Ah, gotcha, I'll check out your video. Sounds promising. If the panel can run static html/js AND access simvars and events that opens up a lot of possibilities.

As for sim vars...they're well documented in the SDK documentation.

scelts commented 3 years ago

there's more, much more in game variables than the ones documented, from what I can see from asobo's panels and similar. there are sim variables, game variables, global etc... anyway, if I figure out how to map the simconnect events (essentially, how to trigger it in-game) I'll fork it and might give it a go with your app, as it's perfect for this. in theory it could be as easy as changing this file only https://github.com/james-atkinson/gs2020/blob/main/gs2020-client/src/lib/simRequests.js

james-atkinson commented 3 years ago

Yeah, I'm looking at your FSPM VFR map looks very promising. I'm gonna play with running it all in the panel, I kinda hate the python server portion anyway. Thanks!

scelts commented 3 years ago

you're welcome. let's see, if I manage somehow these events, I'll package it as an in-game panel for you and we can release it as the 2nd fspm app :) I really want to get rid of having to run 5 different exes for 5 addons :)