ENIGMA Forums

General fluff => Announcements => Topic started by: IsmAvatar on November 20, 2011, 02:54:58 PM

Title: New LGM Backend Map/List
Post by: IsmAvatar on November 20, 2011, 02:54:58 PM
As of LateralGM r549 and ENIGMA r944 (and later), a new LGM backend system has been put in place. The prior system made heavy use of hard-coded lists for each resource type, which was not modular - meaning that it was causing difficulties for adding new resource types (like Overworlds and Definitions et al). The new system completely modularized this so that everything is put in a map, and may either be a non-instantiable resource (like Game Info) or instantiable (like Sprites). The former system didn't include non-instantiable resources in the map, so this is somewhat new territory.

That said, since this is somewhat new territory, we are proceeding with CAUTION. Although I have tested this pretty thoroughly, it's still hard to anticipate all the potential problems this could cause. Please back up your important games before using the new revisions. Please keep an eye open for any resources behaving strangely - including Game Settings, Game Information, and Enigma Settings. One hypothetical example of behavior that would be considered strange: "I press new game, and look at my Game Settings, and it's set this one way. I press new game again, and look at Game Settings, and now the settings are completely different." So keep an eye out for anything like that that might happen.


Also, this warning applies to the next several revisions as well:
1) Oftentimes revisions will update unrelated stuff, so any existing bugs will not necessarily be corrected.
2) Work is going to continue in this modularization in order to bring us new resource types (like Overworlds and Definitions) based on this new backend (which now allows us to do this). Some of the bugs I may have introduced may be hidden, but will be brought forward and made more visible with these new changes.



On the other hand, it's entirely possible (and likely) that this change was so smooth that it caused no new bugs or issues.

Either way (TL;DR version):
1) It's always good practice to back up your games, ESPECIALLY when using LateralGM/ENIGMA.
2) LateralGM is becoming more and more modular, which means that we're really starting to open the doors for new resource kinds.
3) If you notice a bug or strange behavior, as always, report it.
Title: Re: New LGM Backend Map/List
Post by: Fede-lasse on November 21, 2011, 02:55:07 AM
Kinda off-topic, but... If I make a large array that's supposed to contain strings and only some entries are used, will the other unused entries still fill up a lot of memory?
Title: Re: New LGM Backend Map/List
Post by: Josh @ Dreamland on November 21, 2011, 08:43:34 AM
Glad to hear you have that done, Ism.

Fede:
Depends how you make the array.

string array[10000]; // Yes
var array; array[10000] = 0; // No
Title: Re: New LGM Backend Map/List
Post by: Rusky on November 21, 2011, 11:32:53 AM
Also: {,unordered_}map<int, string> array; array[10000] = ""; // No
Title: Re: New LGM Backend Map/List
Post by: RetroX on November 21, 2011, 03:18:08 PM
Fede: Plain arrays just allocate a chunk of memory, whereas the containers that you'll probably use will just constantly add memory when more is needed.  Containers referring to maps, var, etc.
Title: Re: New LGM Backend Map/List
Post by: Fede-lasse on November 22, 2011, 02:51:21 AM
var array; array[10000] = 0; // No
Cool then.

And thanks for info, Retro.
Title: Re: New LGM Backend Map/List
Post by: Josh @ Dreamland on November 22, 2011, 02:17:37 PM
So uh, when do I get my Definitions resource, IsmAvatar?
Title: Re: New LGM Backend Map/List
Post by: IsmAvatar on November 22, 2011, 08:49:48 PM
Working on them as I speak.
Title: Re: New LGM Backend Map/List
Post by: Fede-lasse on November 23, 2011, 02:56:45 AM
But you don't speak; you write. That means she isn't working on them, Josh.
Title: Re: New LGM Backend Map/List
Post by: IsmAvatar on November 23, 2011, 09:48:43 PM
Between a screenshot, the latest revision, and a boolean variable that you can change to see them in action, I'm pretty sure Josh is already convinced that I'm working on them.
Title: Re: New LGM Backend Map/List
Post by: Fede-lasse on November 24, 2011, 02:42:20 AM
no
Title: Re: New LGM Backend Map/List
Post by: Josh @ Dreamland on November 24, 2011, 11:11:55 AM
/kick Fede-lasse
Title: Re: New LGM Backend Map/List
Post by: Fede-lasse on November 25, 2011, 02:48:13 AM
Fede-lasse has joined #enigma-dev
Title: Re: New LGM Backend Map/List
Post by: EnigmaBot on November 26, 2011, 05:00:46 PM
Welcome back, Fede-lasse. Your last visit was 2011-11-24@02:42:20.
Title: Re: New LGM Backend Map/List
Post by: Fede-lasse on November 26, 2011, 07:03:04 PM
wtf
Title: Re: New LGM Backend Map/List
Post by: luiscubal on November 26, 2011, 07:34:29 PM
luiscubal has joined #enigma-dev to say that this discussion is completely pointless and Fede-lasse and Josh should get a life.
luiscubal has left #enigma-dev in a condescending way.