Flex 2

Discussion in 'Utilities' started by snkenjoi, Nov 19, 2017.

  1. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    854
    Location:
    Portland, Maine
    Sorry for double posting. It seems save and then loading the data in Flex 2 for the sprite results in the sprite looking the same as it does in SonMapED. I tried reimporting the art from png, but the art imported incorrectly, and like before saving and loading further messed it up. It's definitely a problem with the tiles and not the mappings or DPLC's.

    Edit: The problem doesn't happen when using a Bitmap image.
    Edit 2: Is there a way to get rid of the window that comes up when you create mappings. It covers a large amount of the space, making editing very difficult.
    Edit 3: It would be useful if there was an option to clone mappings within a single sprite.
     
    Last edited: Apr 9, 2018
  2. snkenjoi

    snkenjoi Well-Known Member Member

    Joined:
    Sep 6, 2008
    Messages:
    57
    This is because Flex 2 can read all the formats that SonMapEd can, but SonMapEd cannot read all the formats that Flex 2 can. Again, you cannot rely on SonMapEd to accurately render all forms of mapping and DPLCs.

    When you say 'messed it up', do you mean that you can't view it in SonMapEd? What do you mean by 'imported incorrectly'? Because yes, SonMapEd will read valid data incorrectly. Is the art corrupted? Are there tiles missing? Did saving and loading somehow change what the data was?

    I'm not sure why you're trying to use SonMapEd to confirm that the output is correct as it does not have accurate support for these formats. I feel like this is simply an issue with your workflow, but maybe I don't fully understand the problem you're having.

    This should not be / is not possible. Once you have loaded the file it is in the same format.

    I opened a github issue for this. Might make it in the next update.

    Type nm to dismiss the mapping window. In the next version I will make it auto dismiss. Have been wondering if I should change that and I guess now I know.
     
    ProjectFM likes this.
  3. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    854
    Location:
    Portland, Maine
    Thanks for responding, but you misinterpretted. When I load a png through the "import spritesheet" feature, it looks fine on the importing screen, but in the mappings editor, the art is slightly messed up. Saving and then loading what I just saved further messes up the art. This doesn't happen when doing the same with a bmp. It's an issue with the art tiles and not the mappings or DPLC's.

    I can provide pictures if you need it.
     
    Last edited: Apr 12, 2018
  4. snkenjoi

    snkenjoi Well-Known Member Member

    Joined:
    Sep 6, 2008
    Messages:
    57
    I did wonder if I misinterpreted you! Sorry about that.

    This doesn't sound like something that should happen at all. Can you provide me with the PNG and BMP files that exhibit this behaviour so I can attempt to reproduce it? Either via PM, github issue or #ssrg
     
    ProjectFM likes this.
  5. Iso Kilo

    Iso Kilo Local Wolf-Fox Member

    Joined:
    Oct 9, 2017
    Messages:
    303
    Location:
    Small Town in BC, Canada
    Probably shouldn't be bumping a year old thread like this, but I have ran into an odd issue. Now it's kind of hard to explain, but I'll try my best.
    If you were to import a sprite, it should work fine, and it does. However, if you try importing another sprite with the same mapping, it'll just import the previous image.
    Say we want to import the sprites on the left, it will import the 1st one, but the 2nd will be a copy of the 1st. The only way to get around this, is by closing and opening Flex 2 again.
    upload_2019-6-15_20-1-14.png
    Apologies if this wasn't clear enough.
     
  6. snkenjoi

    snkenjoi Well-Known Member Member

    Joined:
    Sep 6, 2008
    Messages:
    57
    new version - 0.0.7

    Changelog

    Code:
    Tabs can be maximized
    Sprite swapping keyboard shortcuts added - ctrl+] & ctrl+[
    Sort imported spritesheet into rows properly
    Compression now based on flamewing's mdcomp
        Uses WASM and is much faster
        Added ArtC42, LZKN1, Rocket and RLE compression formats
    Autodismiss new mapping screen
    Better error reporting & enabled devtools (F12)
    Updated many dependencies, added performance improvements and other small tweaks
    
    Some of the changes will have inadvertently fixed some existing bugs, so it's worth testing again. If it's still broken create an issue on github for it and I will get to it.

    This is mainly a quality of life release to clean a few things up before I resume development. This project has been dormant for a little while but I intend to resume working on it.

    Next feature on the roadmap is full custom mapping format support.
     
  7. snkenjoi

    snkenjoi Well-Known Member Member

    Joined:
    Sep 6, 2008
    Messages:
    57
    I accidentally broke KosM compression, so here's a new version - 0.0.8

    Changelog

    Code:
    Changed default palette from Sonic 2 to the SCH unified palette
    Fixed a bug that allows deleting mappings in drawing mode
    Fixed a bug where up/down scrolls when there are active mappings
    Fixed Kosinski-M compression
    Added KosinskiPlus compression
    Rebuilt colour picker
    More dependency upgrades
    
    Still working on custom mapping support, but had to put this out