LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Lasso tool vs Parts/layers for sprite editing?

Root / General / [.]

Gaelstrom_ValenceCreated:
This isn't exactly programming so I thought this would go here. Getting far in my work and now I want to figure out a way to make spriteing more efficient. Torn between implementing a lasso tool or being able to draw and manipulate a multi part sprite at the same. (move around it's pieces while still being able to draw pixels for it) I've got a rough idea how to handle either, but since this sort of thing is never simple, and I'd probably rather make something from scratch than figure out how to mod one of the existing GRP editors, I'd rather focus on just one of these features. I mean for all I know SB on switch already has one of these (working on 3DS here) but screw it. Which of these sound more impactful to you?

Layers are easy in theory but get complicated the harder you think about them. How do you save multiple layers in one GRP file if you want to use them later? How do you store layers in memory? The lasso tool actually seems simpler in design, but maybe more grunt work to actually program? You can think about a selection as a grid aligned with the pixel grid where each space is "yes I'm selected" or "no I'm not selected." Obviously when you're programming a basic rectangle select you just have to know the size and position of the rectangle(s), it isn't necessary to know what pixels are and aren't selected. The lasso tool DOES have to solve what the area inside is though because it's not a basic geometric shape, so it could get complicated. However I think it's easier from an editor standpoint. You don't have to figure out how to save and load layers.

Maybe what you want is a way to draw on multiple sprites at once. Having the "moveable parts"/"layers" available for sprite animation in the actual game probably makes sense in most cases. Like if you're drawing a soldier, you might want to display the soldier without the helmet on at some point, or animate the helmet tilting & bouncing when the soldier is running, etc. So, a tool to display multiple sprites overlapping and a way to draw on all of them (and maybe a way to animate & export that data, too).

Replying to:MZ952
Maybe what you want is a way to draw on multiple sprites at once. Having the "moveable parts"/"layers" available for sprite animation in the actual game probably makes sense in most cases. Like if you're drawing a soldier, you might want to display the soldier without the helmet on at some point, or animate the helmet tilting & bouncing when the soldier is running, etc. So, a tool to display multiple sprites overlapping and a way to draw on all of them (and maybe a way to animate & export that data, too).
No yeah, that's actually what I had in mind! I just wasn't sure of a way to put it that'd like, fit in a title, hah.

Replying to:snail_
Layers are easy in theory but get complicated the harder you think about them. How do you save multiple layers in one GRP file if you want to use them later? How do you store layers in memory? The lasso tool actually seems simpler in design, but maybe more grunt work to actually program? You can think about a selection as a grid aligned with the pixel grid where each space is "yes I'm selected" or "no I'm not selected." Obviously when you're programming a basic rectangle select you just have to know the size and position of the rectangle(s), it isn't necessary to know what pixels are and aren't selected. The lasso tool DOES have to solve what the area inside is though because it's not a basic geometric shape, so it could get complicated. However I think it's easier from an editor standpoint. You don't have to figure out how to save and load layers.
Those, were pretty much thoughts actually. Kinda. The lasso tool would prooobably be the more elegant solution... But I kind of imagine it'd potentially take alot to untangle. I have an article here about how to implement it into another language, but while I kind of understand the broadstrokes, I'm still trying to understand some particular things. While the 'layer' implementation, or better put like MZ952 above says, multi sprite editing, like. I feel like I could sorta brute force that for the most part. But I would have to figure out how to have both the editor and the game itself would keep track of all the sprites in relation to each other, like where their SPHOME values would be, what sprite connects to which, etc... Just, alot of raw work I guess. And I'm not even sure if that'd be as fast at spriting as a lasso tool is.

Okay, I'm gonna go for the lasso tool. (I think I could've pulled off the other way, but god the UI and other decision making was killing me) I've seen some videos and I've got an article about how to do point in polygon stuff, I've got a decent grasp on it, I've even thought of ways to optimize things, so I maaay as well go for it. ... But man, now that I think about it, just being able to like... Take a normal rectangular selection tool and being able to erase part of the copied area before pasting would probably be alot simpler and accomplish virtually the same thing lol.