Sprite Maker Start

Last night, I managed to get a start on the new version of my Sprite Maker. I had an old version that is giving me a great head-start, but I’m starting with some large architectural changes. Like… In the old one, I was storing all of the frames in a List of Lists of Lists of Lists of Frames, which makes sense when it’s worded: a List of Sets which contains a List of Animations which contains a List of Orientations which contains a List of Frames. But using this list in an editor when a user can add or remove any of these, and due to the symmetric structuring of the lists (each set contains the same animations etc), it makes it hard to maintain. I may end up using that method in the end, but I’m experimenting with three dictionaries of frames instead: one for sets, one for animations, and the other for orientations. The idea would be that each dictionary would contain all of the frames, but indexed differently. The dictionaries will also be partially filled, filling in only as frames came into existence. This way, when a user deletes a set, I look up all the frames for that set, and delete those from the other two dictionaries instead of trying to do a whole re-balance of a List of Lists of Lists of Lists.

— Edit —

After some further investigation and thought, I have stuck with maintaining a symmetric List of Lists of Lists of Lists of Frames. For one: it more accurately models the sprite. And for two: removing sections of the symmetric list isn’t quite as difficult as I had previously thought (or as difficult as it sounds).