Spherical forums

Sphere Development => Editor Development => Topic started by: Beaker on September 24, 2015, 11:10:31 pm

Title: Tileset editing bug
Post by: Beaker on September 24, 2015, 11:10:31 pm
Hello all.

I've been doing a bit more work in sphere lately, and a bug that's been around for a while now is starting to... bug me.

Specifically, I've often used the sphere map editor for pixel work, since I can use the tileset palette to select a rectangle of tiles and then edit those tiles in the tileset tab.  I've always preferred the sphere image editor, and using the map editor this way has been the best method I've found for larger images.  However, in v1.5 or 1.4 of the editor, doing this over and over again (selecting a rectangle in the tileset, working on it, selecting a new rectangle, and so on), first causes the Sphere IDE menus to draw black, and then eventually cause the IDE to stop responding.  As well, in these version the insert tile in the tileset and insert frame/direction/sprite in the spriteset editor cause a crash immediately.

Has anyone looked into these issues before?
Title: Re: Tileset editing bug
Post by: N E O on September 25, 2015, 12:39:09 pm
I've used the "edit rectangle" method to edit multiple tiles at once, but I don't think I've ever come across this issue. I've come across the insert tile/frame/direction/sprite crash before, but so rarely that I didn't know what to attribute it to.

Have you given Radnen's Sphere Studio a try? We've been working to phase out the old editor and officially replace it with SS in newer distributions, and if something like "edit multiple tiles" doesn't exist in the map editor portion Radnen and/or Lord English are pretty good about response time if you file an issue on the GitHub repo.
Title: Re: Tileset editing bug
Post by: Radnen on September 25, 2015, 09:39:24 pm
Yes. I knew of the issues Beaker has presented here.

Try giving my SphereStudio a try. The catch is, it's Windows only for now. It does have the ability to edit rectangles. Keep in mind the map editor will always want to separate tilesets from maps. It will still load maps with embedded tilesets, however, but may prompt you to separate the tileset upon saving.
Title: Re: Tileset editing bug
Post by: Beaker on September 25, 2015, 10:28:33 pm
First and foremost, I've tried Sphere Studio and I don't like it.  One thing I've always liked about Aegis was that he was very keen on UI/UX, and he did a good job on the editor.  Sphere Studio's layout is much more restrictive than the windowed approach in the Vanilla editor.

In terms of the bug, I've found that these bugs don't happen in v1.4, so if all else fails I can use that version.  Looking at the memory usage, in v1.4 when I draw a line it seems to allocate a new image's worth of memory (eg: for a 2x2 tile box, it would create 4*16*16*4 = 4k, no extra memory when only one tile is selected), and then with the next line, it'll allocate another 4k of memory and so on, until I select a new tileset rectangle, at which point that allocated memory will be deallocated.  However, in v1.5, while the extra memory is still allocated for each pixel edit (line, pencil, etc.), after changing the tile rectangle, the extra memory is freed.  As well, if I stay on a single tileset rectangle in v1.4 and keep modifying it, I can easily get to 100mbs of memory, and then free it down to 4mbs, but in v1.5, the crash starts happening at around 20mbs of allocated memory.

For the tile insert, it literally happens every single time I try to insert a tile or image/frame in a spriteset.  There's no randomness to it all.
Title: Re: Tileset editing bug
Post by: Fat Cerberus on September 25, 2015, 11:24:16 pm
Huh, definitely a difference of opinion there, I personally hate the UI in the classic editor, it's Windows 3.1-style MDI (think Program Manager) and just makes the whole thing feel like something out of the 90s (which for the most part is probably literally true).  To each his own I guess. :)

I'm guessing you like windowed approach better because you can have more than one editor on-screen?  If that's the case, tip: You can arrange things side-by-side or even a four-way split, MSVC-style, by dragging the document tabs around in Sphere Studio.  The layout won't be saved between sessions, but then again neither will the classic editor.
Title: Re: Tileset editing bug
Post by: Flying Jester on September 25, 2015, 11:38:55 pm
One thing I like more about the old editor is that when a window is in fullscreen, the UI is simple and intuitive. Sphere Studio seems to rarely have as clean an interface up at once. It probably helps that for most things like the map or spriteset editor, the classic editor has two separate screens that are mutually exclusive.

I could do without the windowing, I basically only ever used it as a tabbed interface. But having each tab be less cluttered was nice. I'm unsure if I can set up Sphere Studio to be that way, but it was not clear to me if it is possible.
Title: Re: Tileset editing bug
Post by: Radnen on September 25, 2015, 11:45:41 pm
@jest: I rarely found any control to be clean and intuitive in either editor!

I need to look closer at the functionality someday and draw a line to what makes the most sense to show. I still stand by the layout approach of my editor however since literally every editor I've seen is in that dock-panel like format. After MDI died off, that was the clear winner. I mean, nobody's willing to work on the old one, so let's just tweak this one.

I remember my editor did have an experimental method to store the layout of the controls, it was removed some point recently when @LordEnglish made changes. But maybe this will one day be solved through the new .ssuser filetype we planned.
Title: Re: Tileset editing bug
Post by: Fat Cerberus on September 26, 2015, 12:21:06 am
Yeah, once Cell is in working shape (I'm still trying to whip it into some kind of shape after the extended initial experimental phase) I'll have to look at Sphere Studio again myself and see what can be done to make the UI cleaner.  I'll agree it's kind of a mess right now, even more so with the debugger enabled.