How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post Reply
DridiSara123
Sheikh
Sheikh
Posts: 27
Joined: June 17th, 2018, 1:56 pm

How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by DridiSara123 »

Hi.

I'd love to replace all DOS graphic sprites with Mac sprites for SDL PoP, which should look like this (Because I find Mac Sprite much nicer than Dos Sprite):
SDLPoPMSprite.png
Only problem is. The Mac sprite has slightly more resolution than the DOS sprite.

For example: The wall of Dos is 32x60 pixels.
res364.png
res364.png (311 Bytes) Viewed 11473 times
And on Mac 64x126
wws.png
wws.png (2.65 KiB) Viewed 11473 times
Is there a way to make SDL PoP play higher sprite resolution?
FluffyQuack
Vizier
Vizier
Posts: 80
Joined: June 6th, 2004, 7:05 pm

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by FluffyQuack »

It would require a lot of code changes as render coordinates for objects are hardcoded.

You mention a wall being 32x60 in size, but it's actually 32x63. The bottom 3 pixel rows are part of another texture. So 64x126 is exactly 2x2 times the size of the DOS wall tile. If all Mac assets are 2x2 in size, that would potentially simplify the changes needed for swapping in the Mac assets as you could get away with doubling every render coordinate.

That said, it would still require quite a lot of work coding-wise.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by David »

FluffyQuack wrote: October 1st, 2022, 4:25 pm If all Mac assets are 2x2 in size, that would potentially simplify the changes needed for swapping in the Mac assets as you could get away with doubling every render coordinate.
I have tried that in the past: viewtopic.php?f=126&t=3810

As you can see on the screenshot, it basically worked.
The only problem is that certain image resources don't contain what SDLPoP expects.
For example, instead of the blue stripe there is the right half of a floor panel with the blue stripe above.
FluffyQuack
Vizier
Vizier
Posts: 80
Joined: June 6th, 2004, 7:05 pm

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by FluffyQuack »

David wrote: October 1st, 2022, 9:34 pmI have tried that in the past: viewtopic.php?f=126&t=3810

As you can see on the screenshot, it basically worked.
The only problem is that certain image resources don't contain what SDLPoP expects.
For example, instead of the blue stripe there is the right half of a floor panel with the blue stripe above.
That's not a bad result considering the relatively low amount of changes needed to get there. Maybe someone could combine that with altering the Mac graphical assets to match the layout of the DOS assets.
Sance
Sheikh
Sheikh
Posts: 33
Joined: December 30th, 2013, 4:59 pm

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by Sance »

FluffyQuack wrote: October 2nd, 2022, 1:00 pm
David wrote: October 1st, 2022, 9:34 pmI have tried that in the past: viewtopic.php?f=126&t=3810

As you can see on the screenshot, it basically worked.
The only problem is that certain image resources don't contain what SDLPoP expects.
For example, instead of the blue stripe there is the right half of a floor panel with the blue stripe above.
That's not a bad result considering the relatively low amount of changes needed to get there. Maybe someone could combine that with altering the Mac graphical assets to match the layout of the DOS assets.
I will most likely come off as an arse for being blunt but uh... okay then do it, I've been asking for this since 2016:
viewtopic.php?p=19948#p19948

Rant time: it's incredibly disappointing to see SDLPoP essentially being stuck in place with even smaller new features like teleports taking ages to implement (and in the visually least appealing way possible compared to SNES PoP). I remember a friend telling me that SDLPoP's code is messy so I absolutely understand the hardships of doing stuff like this but I think it would help in preserving and improving the old game.

When it comes to improving stuff here's the original Mac version for example (well it's running through mini vmac and it's a hacked version that achieves parity in game speed with the DOS port so yeah, "original"):

On one hand it's incredible how much better this looks than the DOS port (and PoP 2 looks even more incredible on Mac) but on the other the Mac port also:
- Sounds terrible, like the quality of the music is absolutely atrocious.
- Without emulation hacks like this it's very slow compared to the DOS port.

Basically by supporting the higher res tiles from Mac SDLPoP could combine the benefits of both ports into a great little fanmade release that would essentially work as a remaster in every sense of the word. On top of that SDLPoP already supports things like custom ambient music so things like the wonderful CD quality soundtrack from PoP's FM-Towns port could be added too:

Listen to this, this is amazing, why wouldn't you want to have something like this in your port, imagine how awesome PoP would look like with all thes coming together! Hell you add the chef's kiss by finishing FluffyQuack's widescreen mod and implementing the game and combat speed settings from the FM-Towns ports and it's perfect. Imagine what kind of user maps and mods could be created with access to all of this, new players would actually try to complete the original game again and a new audience for this type of game could form. For example I was messing around with a mod called "Prince 1 and a half" and it's clear that the idea behind it was to dress up and expand the game into a more pleasing state but it's obviously held back by the low res tiles and the fact that the modder still has to use the terrible prince sprite from PoP 2 DOS with its weird outline and general style obviously clashing with PoP 1 DOS's art.

I don't know a thing about programming or game dev in general so all I can do is ask: please take advantage of all the cool things that you can find in other ports, that's the only chance for this game to get the "remaster" that it absolutely deserves. Thanks for listening to my TED talk.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by Norbert »

Sance wrote: March 2nd, 2023, 6:21 pmRant time: [...]
Basically this:
Norbert wrote: April 14th, 2021, 1:12 pmIt's not just the difficulty. It's also that people who have the skills necessary for such a project have generally reached a phase in their lives where their spare time has become much more limited. They may have full time work, either a job or thesis/dissertation, while they may have simultaneously started a family of their own. As a result, their free time may be limited to the weekends, part of which they'll use to recover from the previous work week. They may choose to work on hobby projects, but likely carefully weigh effort-reward trade-offs.
And of the two most prominent SDLPoP developers, David and Falcury, the latter has essentially left, and the former gives priority to fixing bugs and making minor improvements that are requested here and on GitHub.

The SDLPoP teleport graphics were deliberately styled to fit with the other DOS graphics, for consistency. This also means there were various limitations, including small, existing color palettes.

I do understand, and share, your frustration. In theory, SDLPoP could allow programmers to mod the game in many cool ways. But in practice, SDLPoP's use of the original game's code (for drawing tiles, and the complex gameplay loop) makes modding very difficult. I myself am a programmer, and I've often tried to mod SDLPoP, but... there's just no way. If the code would be readable, tiles would be drawn as basic, single back+foreground-combo rectangles, comments would document the gameplay loop, and a how-to would document the process of adding new, custom tiles, then... maybe. But I wouldn't hold your breath. On the plus side, it replicates the original gameplay impressively accurately (unlike e.g. MININIM).
Sance
Sheikh
Sheikh
Posts: 33
Joined: December 30th, 2013, 4:59 pm

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by Sance »

Norbert wrote: March 2nd, 2023, 7:55 pm Basically this:
Yep, yep, I've been lurking enough to understand and also symphatize with the reasons, just hoping to give a nudge if possible because some of the things I've been seeing kinda breaks my heart in terms of "man this looks so cool" vs. "oh well this won't be implemented either".
Norbert wrote: March 2nd, 2023, 7:55 pm The SDLPoP teleport graphics were deliberately styled to fit with the other DOS graphics, for consistency. This also means there were various limitations, including small, existing color palettes.
I get that and I honestly think that it's not far off from where it should be but it needs... well, something that the game does for its more dramatic moments like a screen flash or something to indicate the "shock" of using a teleport. Anyway it was just an observation, it doesn't really matter.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by Norbert »

Norbert wrote: March 2nd, 2023, 7:55 pmBut in practice, SDLPoP's use of the original game's code [...] makes modding very difficult.
A related obstacle are the nondescript image filenames, by the way.
(And that playtesting via apoplexy won't show data/ changes without deleting DAT files. :()
FluffyQuack
Vizier
Vizier
Posts: 80
Joined: June 6th, 2004, 7:05 pm

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by FluffyQuack »

Sance wrote: March 2nd, 2023, 6:21 pmI will most likely come off as an arse for being blunt but uh... okay then do it, I've been asking for this since 2016:
viewtopic.php?p=19948#p19948

Rant time: it's incredibly disappointing to see SDLPoP essentially being stuck in place with even smaller new features like teleports taking ages to implement (and in the visually least appealing way possible compared to SNES PoP). I remember a friend telling me that SDLPoP's code is messy so I absolutely understand the hardships of doing stuff like this but I think it would help in preserving and improving the old game.
If I could clone myself, I'd do a lot more. There's just so many projects I want to work on and then there's that "real life" thing coming into play as well.

I think it's definitely doable to make SDLPoP to support the Mac graphics, but it would involve quite a bit of work, and it would need someone who's motivated and with the time to do it. I haven't had the time to fiddle with POP the last few months, and when I get back to it, I think I'll prioritize working on my POP1/2 engine recreation as that's what I'm personally most interested in.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by David »

I have updated the existing double_size branch to be based on the latest SDLPoP version, and added the double-sized graphics.
https://github.com/NagyD/SDLPoP/tree/double_size_2
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by Norbert »

David wrote: April 15th, 2023, 5:14 pm I have updated the existing double_size branch to be based on the latest SDLPoP version, and added the double-sized graphics.
https://github.com/NagyD/SDLPoP/tree/double_size_2
Out of curiosity, question, I'm wondering why you added "_2" and didn't update the original.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by David »

Norbert wrote: April 15th, 2023, 9:17 pm Out of curiosity, question, I'm wondering why you added "_2" and didn't update the original.
Because when I tried to merge the original double_size into master, I got some modify/delete conflicts, and I had no idea how to deal with those.
These conflicts appeared because the double_size branch is so old (2016!) that it still has the source in the root of the repo instead of in a src/ directory.

So I instead made a diff (patch) from double_size, and edited it to fix the paths.
Then I made the double_size_2 branch from master, and applied the patch onto this new branch.
DridiSara123
Sheikh
Sheikh
Posts: 27
Joined: June 17th, 2018, 1:56 pm

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by DridiSara123 »

I first reduced all Mac sprites by half the resolution. After that, when I replaced all the DOS sprites in SDLPoP with my half-reduced resolution from MacSprite, it now looks like this:
Picture_1.PNG
Despite the low resolution, it doesn't look that bad in my opinion. However, the biggest problem is that some sprite elements are not displayed correctly.

The torches aren't positioned correctly and some layer elements have a gray background, although I also replaced them all from white with a transparent background color.

Also the font looks very weird:
Picture_2.PNG
The title intro doesn't look clean either:
Picture_3.PNG
Also in intro title some elements are displayed with a gray background. And I don't understand why, even though all elements are transparently cut out.

So if there weren't a sprite bug, I'd be almost happy with it, despite the low resolution.

That's why I uploaded my sprite so that you can see where the error is that some sprites get a gray background.

And what I would like so much is that in the future version of SDLPoP will also support higher resolution Texture Offizel.
Attachments
My MacSprite_SDquality.zip
(3.1 MiB) Downloaded 82 times
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by David »

DridiSara123 wrote: June 8th, 2023, 4:03 pm Also the font looks very weird:
Picture_2.PNG
I see that all images in the font folder are antialiased, i.e. they use various shades of gray.
SDLPoP displays all text as monochrome, which means anything that is not black becomes the color of the text.
This breaks the antialiased character images.
DridiSara123 wrote: June 8th, 2023, 4:03 pm The title intro doesn't look clean either:
Picture_3.PNG
Mac PoP graphics are organized slightly differently from DOS PoP graphics.
DOS PoP has the full title image in TITLE/res51.png, so this is what SDLPoP expects.
Mac PoP has only a part of the title screen in TITLE/res51.png, it needs to be drawn centered in front of TITLE/res41.png.
DridiSara123 wrote: June 8th, 2023, 4:03 pm Also in intro title some elements are displayed with a gray background. And I don't understand why, even though all elements are transparently cut out.
Certain images are always displayed without transparency in SDLPoP, because DOS PoP did the same.
The intro images are like that; other examples are the wall patterns in the background, the torch bases, and the moving part of the gate (as seen on your first screenshot).
Sance
Sheikh
Sheikh
Posts: 33
Joined: December 30th, 2013, 4:59 pm

Re: How to replace DOS Sprite to Mac Sprite in SDL Pop?

Post by Sance »

Sooo... SDLPoP is getting there? Please tell me it's getting there, these comments are exciting. :D
Post Reply