sprite sheets

Open-source port of PoP that runs natively on Windows, Linux, etc.
Post Reply
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

sprite sheets

Post by Norbert »

It would be useful if, instead of res* images, the program would use sprite sheets.

The attached example image illustrates what would be only a section of a much larger, single VDUNGEON.png sprite sheet that would replace the entire VDUNGEON/ directory. It would have a transparent background. (The example image actually has that, but you need to click it so see this. And even then the browser may obscure it.)

For modding purposes, the size of all images on the sheets could be doubled (related, related).

The reasoning behind - arguments in favor of - using sprite sheets:
- makes modding easier (easier to find stuff and things are grouped together),
- makes distributing modifications easier (a single file per DAT),
- standardization (SDLPoP and MININIM could use the same sheets).

The areas on the sprite sheets that fall outside any of the res* images should probably get a single, carefully picked non-transparent color to indicate that changes in these areas will not be taken into account.
Attachments
sprite sheet example
sprite sheet example
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: sprite sheets

Post by Norbert »

Oh, to prevent misunderstandings, the sheets would obviously not have those "res..." texts (and red or green lines) on it.
That's just on the example sheet portion to illustrate how the res* images could be combined.
Falcury
Calif
Calif
Posts: 568
Joined: June 25th, 2009, 10:01 pm

Re: sprite sheets

Post by Falcury »

Interesting idea. That might definitely make editing graphics easier.
Norbert wrote: March 14th, 2018, 1:23 pm - makes distributing modifications easier (a single file per DAT),
Doesn't the same advantage apply to plain old .DAT files? ;)
Norbert wrote: March 14th, 2018, 1:23 pm The areas on the sprite sheets that fall outside any of the res* images should probably get a single, carefully picked non-transparent color to indicate that changes in these areas will not be taken into account.
I'm biased towards Jazz Blue, although that's more nostalgia than anything else...
And I personally have never seriously edited the graphics, so I hardly have a right to speak about this (as in, I would not be the person who would in the end be likely to stare at that color for prolonged periods of time). :P

From a technical standpoint, though, I guess the spritesheet would still need to be palettized, just like SDLPoP's png images are. So letting the first color of the palette be the transparent color might already do the trick.

From a distribution standpoint, wouldn't DAT files be preferable, because they are also compatible with the DOS version?
Then, if there was a conversion utility to/from DAT, a spritesheet may be an excellent intermediate format suitable for editing?

Come to think of it, if spritesheets are primarily used as an intermediate format, maybe BMP is an alternative format to consider. (Because (older) tools might have better support for palettized BMP, compared to PNG?)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: sprite sheets

Post by Norbert »

Falcury wrote: March 14th, 2018, 4:34 pm
Norbert wrote: March 14th, 2018, 1:23 pm - makes distributing modifications easier (a single file per DAT),
Doesn't the same advantage apply to plain old .DAT files? ;)
I meant a single file per DAT instead of an entire VDUNGEON/ directory.

VDUGEON.DAT => single file, not directly modifiable (needs PR)
VDUNGEON/ directory => lots of files, directly modifiable
VDUNGEON.png (sprite sheet) => single file, directly modifiable
Falcury wrote: March 14th, 2018, 4:34 pmI'm biased towards Jazz Blue, [...]
It might be a nice tribute and fun detail for newbies to learn about.
Then again, Jazz Blue was used as a transparency color, which means its function would change.
To clarify, from what I understand we'd need a color to mark all the sheet areas that are not part of any original res* images.
The res* image portions would either have colors or transparency.
Black could be use to indicate transparency, to prevent modders from having to work with actual transparent pixels.
Falcury wrote: March 14th, 2018, 4:34 pmspritesheet would still need to be palettized
Is that necessary?
If possible, we'd want modders to be able to use whatever colors they want.
This and double sizing make DAT files unsuitable as a conversion target.
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: sprite sheets

Post by David »

Norbert wrote: March 14th, 2018, 5:22 pm
Falcury wrote: March 14th, 2018, 4:34 pmspritesheet would still need to be palettized
Is that necessary?
If possible, we'd want modders to be able to use whatever colors they want.
Just for the record, the discussion was continued here: https://github.com/NagyD/SDLPoP/issues/169
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: sprite sheets

Post by Norbert »

First attempt. With VDUNGEON.DAT.
Chompers, spikes and gate bars should be in the correct order.
Attachments
VDUNGEON.png
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5786
Joined: April 9th, 2009, 10:58 pm

Re: sprite sheets

Post by Norbert »

Norbert wrote: December 25th, 2018, 7:10 pm First attempt. With VDUNGEON.DAT.
Chompers, spikes and gate bars should be in the correct order.
Actually, staring at this for a while, I don't think this would be very useful.
Because modders still would not be able to draw freely.
(Just look at those spike chunks in their many, limited-space, rectangles, for example.)

The only way to truly give modders freedom would be to make each tile (or tile-frame for animations, or tile-layer for tiles that have a fore- and background) full-sized, similar to how tiles are displayed in apoplexy. I guess I had to put in the effort to create this VDUNGEON.png to fully realize this.

And if each tile would have the same full size, sprite sheets would no longer be useful. So, sprite sheets aren't a useful tool to solve the graphics modding 'problem'.
Post Reply