eliasdoehne / stellaris-dashboard

A graph dashboard and event log for Stellaris.
126 stars 15 forks source link

Add option to render maps using StellarMaps (if installed) #119

Open MichaelMakesGames opened 1 year ago

MichaelMakesGames commented 1 year ago

My main side project recently has been StellarMaps https://github.com/MichaelMakesGames/stellarmaps, a Stellaris map renderer. I think it would be very cool if the dashboard could show maps produced by StellarMaps, if both are installed and running. The dashboard would get additional features (terra incognita, country emblems, colored borders, style customization etc), plus any new features added to StellarMaps.

This isn't possible now (I would need to add some features to StellarMaps), so this is just to start the conversation. Main thing to figure out is how the dashboard would get the images from StellarMaps. I see 2 basic approaches:

By the way, here's a few pictures of maps generated with StellarMaps: lotor_cropped map Screenshot from 2023-09-11 16-57-05

eliasdoehne commented 1 year ago

Wow, that looks really nice! I'll try it out this weekend. If there is a good way to integrate it, let's try it!

For reference, the galaxy map in the UI is built with the dash framework here and there is an alternative matplotlib implementation that is used for exporting timelapses.

MichaelMakesGames commented 1 year ago

Thanks!

The more I think about it, the more I think StellarMaps should just be running in the background, and Stellaris Dashboard should just load the files it produces. StellarMaps needs data from the saves that Stellaris Dashboard does not (emblems, terra incognita, and more).

I think SVG format will probably be best. That should be smaller than the PNGs, it's more efficient for StellarMaps to produce, and it will work much better than PNGs if we want it to be interactive. A simple POC implementation could just serve up a the most recent StellarMaps export. Then later we can add timeline controls, panning/zooming, and system tooltips.

Fow now, StellarMaps does not have the ability to run in the background, but I'm going to add that away, planned for the release after next. Can't do much on this until then.

eliasdoehne commented 1 year ago

Sounds good,I was also considering to backup the saves parsed by the dashboard to some location to allow reprocessing. Maybe it would also be an option to pass the save to your application on demand for time-travel or time lapses?

Just fyi, I'm gone for a few days but I should be able to take some time this weekend

MichaelMakesGames commented 1 year ago

That could work too.

Depending on autosave frequently, that could be lot of data you're backing up. Save files can be many megabytes, especially on a larger map or later in the game, so that could mean gigabytes worth of back ups. For StellarMaps I'm planning on creating save backups, but only the subset of data StellarMaps so it doesn't use too much disk space

Just fyi, I'm gone for a few days but I should be able to take some time this weekend

No worries and no rush, we're all just in this for fun

MichaelMakesGames commented 6 months ago

Unrelated to this, I plan on creating a feature-limited AWS Lambda version of StellarMaps. That might also be the best way to integrate StellarMaps with Stellaris Dashboard. Then, the user wouldn't even need to StellarMaps installed locally. I'll post here again after I've actually implemented that