Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Azgaar's Fantasy Map Generator - Expanded integration plans?

A topic by dvinmn created Feb 16, 2023 Views: 858 Replies: 4
Viewing posts 1 to 4
(+1)

I'm sure you've been asked this question a hundred times already, but do you have any plans to expand integration between MFCG and FMG to include maintaining edits such as warping city layouts, or maintaining points of Interest (Locations) or district renaming?

FANTASTIC suite of software products, by the way. You are without a doubt one of my favorite developers doing this sort if thing.

Regards,

dvinmn

Developer

I do not have such plans, sorry. I agree that this would be a useful feature (although surprisingly I've never been asked this question before :)), but it's just too hard/impossible to implement. The two generators exchange information by putting it into a url. Currently it's a seed, a few flags (coast, river etc), a name. For comparison, warping data of a medium-sized city would consist of hundreds of floating point numbers. Urls are not suitable for that. For the same reason, changes made with the warp tool are not saved in permalinks.

(+1)

Thanks for the feedback.

I may be mistaken, but it doesn't look like your full, updated source code is posted on Github. Maybe a number of versions behind?

I'm asking because I was curious to poke around in the code related to saving the .json file. For my own curiosity.

Although I'm a total scrub, (believe me, I know), I thought I'd ask:

Might it be possible to utilize the web browser's storage to maintain a user's edits between sessions?

Something (veeerry loosely) like this:

com_watabou_system_Exporter.saveJSON = function(data,name) {
var text = JSON.stringify(data);
localStorage.setItem('editData', text);

...and possibly retrieved thusly:

const savedJsonData = localStorage.getItem('editData'); const savedData = JSON.parse(savedJsonData); console.log(savedData);
???

Probably talking out of my @$$ here ;)

Developer (1 edit)
it doesn't look like your full, updated source code is posted on Github. Maybe a number of versions behind?

The source code on github is I don't know how many years old, it's one of the first versions of the generator. I'm not planning to update it anytime soon: normally I don't publish code of projects I am still working on, that old code is an anomaly :)

Might it be possible to utilize the web browser's storage to maintain a user's edits between sessions?

There are a number of problems with the idea of storing changes locally, both technical and conceptual:

  • LocalStorage is not good for storing "data", it is designed to store "state" (it's a thin line of course). Its available size is a few megabytes (as far as I remember). This is not much, because everything in there is stored as strings and, more importantly, changes made to many (potentially very many) cities need to be stored.
  • It's either saving changes made to every generated map which seems just wrong, or asking every time "do you want to save changes for the future?", "it looks like you edited this city before, do you want restore changes?" which seems awkward.
  • Changes saved this way are not transferable. They won't be applied if you open the same fantasy map on another computer and click a settlement, which is counterintuitive.

OK, I was going to write a couple more points, but got tired :). At the moment it seems to me that this functionality is only possible if Azgaar's generator and mine are merged into one application and it's not something we are planning.

(+1)

OK, thanks for taking the time to respond!