Coder Social home page Coder Social logo

flex2's People

Contributors

kirjavascript avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flex2's Issues

You may have a memory leak

When you start Flex2 it is on average using around 300mb of memory, well I've noticed that after a while (30 minutes or so) that it sometimes spikes to 1500mb (when editing mappings) or decreased to as low as 14mb (when in drawing mode). If it helps I can send you the files I'm working with so you can see if you get a similar result.

Usability issues

Creating a new project for trying flex2, I encountered a few issues with regards to usability. The most glaring ones:

  • There should be a way to configure per-project defaults for mapping/DPLC format. Currently, there is a lot of clicking needed to create more than one object in the UI. This works double for custom mapping/DPLC formats, maybe there should be a way to create them on a project basis with a name and they appear on the drop down list of formats.
  • There should be a way to specify per-project path defaults for the various data files. For example, in S2 disassembly you could set 'art/palettes' for palettes, 'mappings/sprite' for mappings, and 'mappings/spriteDPLC' for DPLC, and maybe 'art/uncompressed' for uncompressed art, etc. Whenever you click to load a given piece of data, the corresponding path would start selected.
  • There should be a way to reorder objects in a project, be it by drag/drop or by buttons to move up/down.
  • Likewise, there should be a way to delete objects from a project.
  • Another possibility would be to duplicate an object.
  • Mapping mode prevents you from actually seeing the sprite pieces if the window is not big enough. Maybe the floating menu should be rethought.
  • Enabling raw editor without memorizing the hotkey to disable it can force a restart of flex to close it. There should be a close button available.
  • There should be a way to zoom out the images on the 'sprites' strip on the right. Especially for larger sprites, they can overflow the size available for each frame, but also being able to see more frames would be good.
  • A goto frame functionality might be useful.

If you prefer, I can break this up into multiple issues.

Configurable paths

There should be a way to specify per-project starting directories for picking art/mappings/DPLC/palettes. As is, if you start Flex from explorer, the dialog boxes always default to Flex' directory, making using them painful.

Animation Editing Support

Basically just take my SonAni program and do the same thing here. That way people can have a visual animation editor that's integrated into their sprite mapping editor rather than needing two separate programs with two different project formats.

Ability to delete tiles

Self Explanatory, being able to delete certain tiles (without removing all unused tiles) or add tiles arbitrarily would be nice to have as I've found myself needing that function quite a few times.

Importing from Sprite Sheet doesn't work with DPLCs

Whenever I try to import a sprite sheet while using DPLCs, the art tiles and mappings are generated, but the DPLCs aren't modified properly (which results in scrambled frames). This feature works just fine if DPLCs' are disabled. I'm using uncompressed art and Sonic 2s' format for DPLCs' and mappings, if that's any help.

Add ability to cycle through sprite pieces

In SonMapEd, you can cycle through the individual sprite pieces of a sprite frame by pressing shift+[ or shift+]. Having the ability to do similar in Flex would be great, even if the keys used are different. As-is, it is impossible to select one sprite if two sprites overlap at the same location.

This happens when I attempt to close a project.

TypeError: this.project.cleanup is not a function
at file:///C:/flex2/resources/app.asar/bundles/main.js:192:105519
at we (file:///C:/flex2/resources/app.asar/bundles/main.js:15:6740)
at r (file:///C:/flex2/resources/app.asar/bundles/main.js:15:6636)
at Object.l (file:///C:/flex2/resources/app.asar/bundles/main.js:135:456)
at p (file:///C:/flex2/resources/app.asar/bundles/main.js:135:599)
at file:///C:/flex2/resources/app.asar/bundles/main.js:135:745
at m (file:///C:/flex2/resources/app.asar/bundles/main.js:135:831)
at at (file:///C:/flex2/resources/app.asar/bundles/main.js:135:16359)
at ot (file:///C:/flex2/resources/app.asar/bundles/main.js:135:16169)
at lt (file:///C:/flex2/resources/app.asar/bundles/main.js:135:16525)

Add Sprite Sheet Export

If possible, it would be nice to have some configuration options like SpriteSheetGen for background color, sprite distance, whether to use a grid, image size/number of columns.

Mappings Are Blank

Okay, I'm not sure why, but this issue is happening; I am making a Sonic 1 hack but for some reason all of Sonic's mappings are blank; these are my settings. Why is this happening?
Flex 2 9_04_2021 2_26_39 PM

Sprite strip has wrong zoom

While trying out the new release, I noticed that the fix for issue #45 unfortunately seems not to pick a good zoom at all. This is more apparent for larger sprites, such as Vector in the this screenshot:

image

In comparison to the previous version, the sprites in the right strip all have the same zoom level (which is great) but almost all of the frames visible are cropped.

Somehow broke the project loader. Cannot close project, thus the program is inoperable.

TypeError: this.project.cleanup is not a function
at file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:192:105519
at we (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:15:6740)
at r (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:15:6636)
at Object.l (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:135:456)
at p (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:135:599)
at file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:135:745
at m (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:135:831)
at at (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:135:16359)
at ot (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:135:16169)
at lt (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:135:16525)

Various invalid files crash or freeze Flex2

Loading invalid files (such as uncompressed files when compressed files were expected) can cause Flex2 to crash. Instead, Flex2 should attempt to detect when files are not valid or cause erratic data to be spit out, it should warn the user about it instead.

Support for S&KC mappings/DPLCS

15:58:44 <%MainMemory> snkenjoi: can you add support for S&KC sprite mappings/DPLC, it's the same as S3K but in little endian

Where do I load the ROM file?

Yeah uh this tool looks really amazing, but where do I open an actual rom file? There's no actual guide on how you edit the in-game's sprites anywhere. I'm practically left in the dark here!

Colours don't convert into index 0 unless it's through Sprite sheet importing

When using "Import Over Sprite", index 0 from the palette isn't being considered as the transparency colour at all, making it impossible to use an opaque image for any small changes.
This isn't the case for the "Import spritesheet" function, which automatically assumes the background colour as transparent.
This can get really annoying for updating any existing sprites when you mainly use a tool that doesn't support transparency (such as MSPaint) and have to rely on a separate program to remove the background colour.

Sprite example used for importing :
image

Expected Result :
image

Actual Result :
image

Sonic 3&K's object DPLC is buggy if the first sprite is blank

SpritePlotter.Net's output of this format gets really buggy if the first sprite is null despite working fine when implemented in a ROM hack

Example of generated DPLC :

DPLC_Gatoslip_Overworld_dplc:
	dc.w	DPLC_Gatoslip_Overworld_dplc_Null-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_0-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_1-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_2-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_3-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_4-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_5-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_6-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_7-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_8-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_9-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_10-DPLC_Gatoslip_Overworld_dplc
	dc.w	DPLC_Gatoslip_Overworld_dplc_11-DPLC_Gatoslip_Overworld_dplc

DPLC_Gatoslip_Overworld_dplc_Null:	dc.w $FFFF

DPLC_Gatoslip_Overworld_dplc_0:	dc.w 1
	dc.w $F
	dc.w $102

DPLC_Gatoslip_Overworld_dplc_1:	dc.w 2
	dc.w $13B
	dc.w $1F1
	dc.w $212

DPLC_Gatoslip_Overworld_dplc_2:	dc.w 2
	dc.w $247
	dc.w $2C8
	dc.w $350

DPLC_Gatoslip_Overworld_dplc_3:	dc.w 1
	dc.w $36F
	dc.w $463

DPLC_Gatoslip_Overworld_dplc_4:	dc.w 1
	dc.w $4AF
	dc.w $5A2
[...]

What Flex2 does after loading the file and saving:

DPLC_Gatoslip_Overworld_dplc:
DPLC_Gatoslip_Overworld_dplc_0: 	dc.w DPLC_Gatoslip_Overworld_dplc_2-DPLC_Gatoslip_Overworld_dplc
DPLC_Gatoslip_Overworld_dplc_2: 	dc.b $0, $2C
	dc.b $0, $2
	dc.b $1, $3B
	dc.b $1, $F1
	dc.b $2, $12
	dc.b $0, $2
	dc.b $1, $3B
	dc.b $1, $F1
	dc.b $2, $12
	dc.b $0, $2
	dc.b $2, $47
	dc.b $2, $C8
	dc.b $3, $50
	dc.b $0, $1
	dc.b $3, $6F
	dc.b $4, $63
	dc.b $0, $1
	dc.b $4, $AF
	dc.b $5, $A2
	dc.b $0, $2
	dc.b $5, $DB
	dc.b $6, $90
	dc.b $6, $A1
	dc.b $0, $2
	dc.b $6, $C7
	dc.b $7, $48
	dc.b $7, $D0
	dc.b $0, $2
	dc.b $7, $EB
	dc.b $8, $A2
	dc.b $8, $D1
	dc.b $0, $1
	dc.b $8, $FF
	dc.b $9, $F2
	dc.b $0, $2
	dc.b $A, $2B
	dc.b $A, $E1
	dc.b $B, $2
	dc.b $0, $3
[...]

Here's what it looks like when importing the file as is:
image
And this is what it looks like after changing the first entry of the DPLC with the same as the second
image

Support for S3K Non-Player DPLCs

The differences between this and the S2/S3K Player DPLCs:

  • The header is the number of requests minus one.
  • The length and tile offset portions are switched.

Uneven scaling of sprites

The sprite strip on the left side uses a different scaling value for each sprite frame. There should be an option to have them all use the same scale, and maybe it should be on by default. As is, it makes it difficult to judge if the sprites are of the appropriate size.

Out-of-bounds memory access

    at wasm-function[151]:0x8d8a
    at wasm-function[95]:0x6ae3
    at wasm-function[81]:0x664e
    at wasm-function[1017]:0x3f5e9
    at wasm-function[972]:0x39faf
    at Te (file:///<path>/tools/flex/resources/app.asar/bundles/main.js:160:18124)
    at file:///<path>/tools/flex/resources/app.asar/bundles/main.js:160:18750
    at Be (file:///<path>/tools/flex/resources/app.asar/bundles/main.js:160:18773)
    at et.<anonymous> (file:///<path>/tools/flex/resources/app.asar/bundles/main.js:160:31206)
    at we (file:///<path>/tools/flex/resources/app.asar/bundles/main.js:15:6740)

<path> was redacted for simplicity. Got this error with these settings:

image

On an otherwise empty project. Using Windows x64 version, on Windows 10 v2004.

KosM art cannot be loaded in v0.0.7

There seems to be an issue when trying to load KosM art in the latest release. Nothing appears to get loaded. Nemesis and uncompressed work fine, so it's probably an issue with the decompressor? This problem didn't occur in v0.0.6. I'm running Windows 7 (64-bit) and the issue persists with both the x86 and x64 releases of Flex2. Below is an image of what it looks like:
Flex2

Flex2's image importing remembers images too well

When trying to import over a sprite or import a spritesheet, it will remember that file the last time you used it to import.
Say you have it open in a image editor and you change one or two pixels, perhaps a whole tile worth of changes while Flex2 is still open after having imported that same file before making changes, it will use the old incorrect version of the file it had loaded beforehand and not reload the file, having to resort to either renaming the file or closing and re-opening Flex2 to get around it, which is annoying.

Hopefully the explanation is sufficient, It's 11PM and I'm kinda tired so I apologize for any misinterpretations!

Tutorial on how to use?

I want to use this to make a ROM hack to modify a sprite (say, of Sonic standing). How do I go about this? There doesn't seem to be any documentation.

Error Report for Flex 2 0.0.8

You can move the selected mappings in any direction, but if you try to move the selected mappings up or down by more than one pixel by typing in the multiplier then pressing the arrow key, the following error occurs:

Unhandled Error

TypeError: Cannot read property 'preventDefault' of undefined
at Object.func (file:///resources/app.asar/bundles/main.js:160:375730)
at file:///resources/app.asar/bundles/main.js:160:389219
at et. (file:///resources/app.asar/bundles/main.js:160:33458)
at we (file:///resources/app.asar/bundles/main.js:15:6740)
at et.r (file:///resources/app.asar/bundles/main.js:15:6636)
at Ix (file:///resources/app.asar/bundles/main.js:160:389157)
at u (file:///resources/app.asar/bundles/main.js:20:4141)
at y.t._handleKey (file:///resources/app.asar/bundles/main.js:20:5384)
at y.handleKey (file:///resources/app.asar/bundles/main.js:20:2280)
at HTMLDocument.h (file:///resources/app.asar/bundles/main.js:20:4392)

Trying to report the error would give you another error:

Unhandled Promise Rejection

Error: Failed to open

Happens sometimes when trying to select mappings or use drawing mode

TypeError: Cannot destructure property 'top' of 'o.init[n]' as it is undefined.
at file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:146:487423
at Array.forEach ()
at hn. (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:146:69470)
at z (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:16:18016)
at hn.n (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:16:17620)
at HTMLDivElement. (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:146:487392)
at gC.apply (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:146:453444)
at g_ (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:146:442243)
at Object.a (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:146:456039)
at d (file:///C:/Users/Administrator/Documents/GitHub/S2-Full-Throttle/Tools/Flex/resources/app.asar/bundles/main.js:146:454887)

Frame Remapping

Doesn't seem like this is still being worked on but might as well bring this up.
Remapping frames is pretty tedious in this program atm, You have to click and drag sprites which is fine and all but it's really hard to do it when the destination you want is far away. Like for instance Sonic's standing frame is 1 and if you import a new sprite it'll put it down at the bottom, let's say $84. You then have to drag it up super slowly but holding it on the top of the screen or try the page up buttons which only works like once or twice before you have to set the frame down and try again.

My suggestion is to have a box that has the frame number in it and you can type what you want it to be. If you go over max either have it cap off or create empty frames. (could even ask you)

Add ability to add global palette offset for objects

Some objects (example: Rexon badnik in Hill Top Zone in Sonic 2) use the foreground or background palette lines (lines 2/3). These palette offsets are coded into the game, so that directly loading the mappings with the level palette will be unable to display them with the correct colors. It can be worked around by splitting the palette lines, or by editing the game to use palette line 0 and bake the palette into the lines, but having the ability to add a palette offset for all frames of a given object would make things simpler.

Main window is not resizable or closable on Linux

As of version 0.0.8, Flex 2 has various usability issues, at least when run under Linux.

The main window has no close/maximize/minimize controls and is not resizable, as seen on the screenshot below:

Main window

Moreover, the window doesn't even appear on the task bar, so it's hard to find when it's masked by other windows.
What's worse, since window doesn't enable closing, there's no way to normally quit Flex 2 other than manually killing its process.
Improper termination of the application, in turn, soon leads to even worse side effects, like Flex 2 unable to load at all on the next launch (all I see is empty window with the background), until application data (including local storage) is cleared manually.

This makes Flex 2 almost unusable on Linux.
I'm currently running it on Ubuntu 18.04-based distro.

Could not find 'scripts' directory error in macOS release

Error message as follows:

Could not find 'scripts' directory for mapping definition files
Searched in;
	/private/var/folders/z4/nygrnkmx2f577m152mz9zjkh0000gn/T/AppTranslocation/3C937884-4C8C-4995-919B-2511A8349ACA/d/Flex2.app/Contents/Frameworks/Flex2 Helper (Renderer).app/Contents/MacOS/scripts
	/scripts

Screen Shot 2021-08-15 at 4 34 11 PM

I'm on macOS 10.15.5 and I'm using Flex 1.1.4

Multiple art files for object

Some objects need the ability to load multiple art files, or have a range of blank tiles added before or after the art, similar to what is done for palettes. A couple examples of objects that require this feature:

  • Spiker badnik from Hill Top Zone in Sonic 2: it reuses the Sol badnik's art for its body, which needs to come before the art for the Driller badnik's art
  • The Sol badnik from Hill Top Zone in Sonic 2: it uses the global fireball art, which must be before the Sol badnik's art

There are more, but these should suffice to test.

Flex2: cannot execute binary file

So I'm trying to make a Sonic 2 ROM Hack, and I found that Flex 2 would be a good tool for graphics hacking. I'm using Ubuntu 18.04 LTS 64-bit. When I try to run the Flex2 executable, it gives me this error:
Flex2: Flex2: cannot execute binary file
Am I doing something wrong?

Keep getting "Error: Can only save art at offset 0" despite it being set on 0

I've only encountered this recently and I asked around the Sonic Retro Discord server looking for help with this bug, but whenever I edit a piece of art using offsets, mappings, dplcs and palletes, I try to save my work and I keep getting this message. I'm working with a Sonic 1 dissassembly and no matter what I edit from the disasm, I keep constantly getting the same issue. Is there any fix for this?
image

Onion skin function

I know I've suggested this on Discord like three times, but it really would make aligning sprites slightly easier. Might try to do it myself and submit a pull request, but I have zero experience working with Electron, so that's not a guarantee.

Here's the example from the Wikipedia article for onion skinning, just to make sure you know what I'm talking about this time.

Maybe right-clicking on a frame or pressing 'o' in the editor could do it? Add a box for what frame to display in the control list, maybe?

Tile offset setting

Similar to the option in PlaneEd and SonPLN, it would be nice to have an option to specify at what tile the mappings expect the art to start at and automatically adjust the mappings' tile indexes by that amount on load/save, so that e.g. people could edit the HUD (at least the parts that use compressed art) without needing a full VRAM dump.

Mapping/DPLC formats from other games

Is this compatible with other games like Streets of Rage, Shinobi, Golden Axe, Rocket Knight Adventures, Soleil and The Story of Thor using the custom mappings option?

Unable to Save Kosinski Art

Flex gets stuck saving if you try to save kosinski art, and it also keeps you from saving any other files that were loaded with the object, even if the Kosinski file is cleared.

Support common shortcuts

There are a lot of common shortcuts that people use to make working on things easier. Flex2 seems to have poor support for these shortcut key combinations at the moment. For example, CTRL+S, CTRL+N and CTRL+O could be useful additions to the program.

Program hangs when loading mappings

Flex2 freezes when trying to load the mappings for Sonic 2's level select icons. (mappings/misc/Level Select Icons.bin)

I have tried from multiple different sources, and could not get them to load.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.