Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: namida on October 08, 2019, 08:16:52 PM

Title: [DISC.][PLAYER] High-res support
Post by: namida on October 08, 2019, 08:16:52 PM
I'd like to look at implementing support for a high resolution mode in NeoLemmix. If not much else comes up, I might even make this a target feature to have for V12.8.X.

First - let's cover a few things that I'm not interested in arguing about, but will be "this is how it is - deal with it":
- There will be no separate high-res physics. Physics will remain unchanged. High-res mode will be a purely graphical matter.
- Custom styles will not be obliged to provide high-res graphics. It's purely optional.
- The feature will be intended for use for low vs high resolution, not for alternate skins. Technical and/or rejection-of-style-submission measures may be taken to enforce this.

WillLem has been working on some high-res lemming sprites (https://www.lemmingsforums.net/index.php?topic=4421.0) that we can use. For the official styles, we can rip high-res graphics from an existing version that has them, such as WinLemm or Mac Lemmings.

Some things that I feel should be discussed:
- Should graphic sets remain required to provide low-res copies of graphics, or should it be acceptable to provide only high-res ones (and NL downscales these for players using low-res mode)? Or perhaps, should it be required for terrain (due to terrain directly impacting physics) but optional for everything else? (My thought: Downscaling is fine, as long as it's a custom-implemented algorithm and not reliant on the graphic library's downscaling algorithm.)
- If a user is playing in high-res mode and encounters a level that some / all components of don't have high-res versions, should NL fall back to low-res, or try to upscale the low-res pieces? (My thought: Upscale.)
- If a user is playing in high-res mode and specifically custom lemming sprites that are in use don't have high-res versions, what's preferable as a fallback: upscaling of the equivalent low-res sprites, or use of the default high-res sprites? (My thought: Again, upscale.)
- Is it important for the editor to support high-res mode? This would be a lot of work to implement. (My thought: No. Editor is fine to remain low-res.)



Todos:
- Bug with backgrounds
Title: Re: [DISC.][PLAYER] High-res support
Post by: IchoTolot on October 08, 2019, 08:33:23 PM
I would say:

- Graphic sets are required to either provide high or low res physics (or both). I think there could be sets that would work best in a higher res.

- If a user plays in a high res mode and plays a set that doesn't have high res graphics, NL should fall back to low res graphics. I think upscaling (or downscaling) could go wrong and create inaccurate or quite weird graphics. The same goes for the lemming sprite point. If I play in low res and I encounter a high-res only set I think it would be better if NL keep the graphics for this set high res. I could be proven otherwise here though as I am quite sceptical of the accuracy of scaling algorithms.

- I don't think we need a high res editor, especially when it's a ton of work.
Title: Re: [DISC.][PLAYER] High-res support
Post by: GigaLem on October 08, 2019, 08:34:44 PM
While High rez stuff is nice, I don't really deem it practical, I doubt many people will use it or be able to pretty up their graphic sets for high rez mode to match or anything. I appreciate what efforts willLem can go through but I don't really see this being necessary.
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on October 08, 2019, 09:02:07 PM
Quote
- Graphic sets are required to either provide high or low res physics (or both). I think there could be sets that would work best in a higher res.

I'm not sure what you mean by this - "graphic sets must provide at least one resolution", that's pretty much implied; or "we should choose one resolution that all styles are required to have, but the other is optional", if we go this route then of course low-res would be the required one as that's what physics are based on and what all styles already have.

If we don't have upscaling / downscaling and use a "you can provide either resolution", this means low-res-only and high-res-only styles cannot be mixed together. It would also more or less mean that providing a high-res version of any given style is on an all-or-nothing basis.

Most of all - if physics remain low-res-only (and they will be, this is not up for debate), we cannot have high-res-only styles without downscaling. Thus, if we don't have downscaling, all styles are either "low-res only" or "both resolutions".
Title: Re: [DISC.][PLAYER] High-res support
Post by: IchoTolot on October 08, 2019, 09:10:45 PM
Yeah you are right here. Maybe it's simply better to say low-res is mandatory to provide for sets and high-res is optional.
Title: Re: [DISC.][PLAYER] High-res support
Post by: mobius on October 08, 2019, 09:57:13 PM
I'd like to look at implementing support for a high resolution mode in NeoLemmix. If not much else comes up, I might even make this a target feature to have for V12.8.X.

First - let's cover a few things that I'm not interested in arguing about, but will be "this is how it is - deal with it":
- There will be no separate high-res physics. Physics will remain unchanged. High-res mode will be a purely graphical matter.
- Custom styles will not be obliged to provide high-res graphics. It's purely optional.
- The feature will be intended for use for low vs high resolution, not for alternate skins. Technical and/or rejection-of-style-submission measures may be taken to enforce this.

WillLem has been working on some high-res lemming sprites (https://www.lemmingsforums.net/index.php?topic=4421.0) that we can use. For the official styles, we can rip high-res graphics from an existing version that has them, such as WinLemm or Mac Lemmings.

Some things that I feel should be discussed:
- Should graphic sets remain required to provide low-res copies of graphics, or should it be acceptable to provide only high-res ones (and NL downscales these for players using low-res mode)? Or perhaps, should it be required for terrain (due to terrain directly impacting physics) but optional for everything else? (My thought: Downscaling is fine, as long as it's a custom-implemented algorithm and not reliant on the graphic library's downscaling algorithm.)
- If a user is playing in high-res mode and encounters a level that some / all components of don't have high-res versions, should NL fall back to low-res, or try to upscale the low-res pieces? (My thought: Upscale.)
- If a user is playing in high-res mode and specifically custom lemming sprites that are in use don't have high-res versions, what's preferable as a fallback: upscaling of the equivalent low-res sprites, or use of the default high-res sprites? (My thought: Again, upscale.)
- Is it important for the editor to support high-res mode? This would be a lot of work to implement. (My thought: No. Editor is fine to remain low-res.)

I completely agree with the no-argument points (not that it matters since there's no argument :P )

Having said that I must honestly say I vote this be a low priority. I'd much rather see other things like skills or other new game features be implemented or bugs fixed before seeing this. Adding this would add a lot of new complications and subsequent issues that need their own resolving. As your questions sort of indicate. And we already have a long list of issues that need resolving atm.
-Having high and low res graphics in the same game feels really weird to me.
-Seeing low res graphics in editor then see them change in the player also seems weird. I'd like the editor to represent the levels as accurately as possible.

If it is implemented; would it be able to support the Lemmini graphics? Which would be very nice since then at the very least all the original sets would easily have high res replacements.
Title: Re: [DISC.][PLAYER] High-res support
Post by: ccexplore on October 08, 2019, 11:20:17 PM
If it is implemented; would it be able to support the Lemmini graphics? Which would be very nice since then at the very least all the original sets would easily have high res replacements.

Yeah, in fact I'd almost go as far as to say that the Lemmini/WinLemm (and maybe Mac Lemmings) graphics may likely be the only use of high resolution in NeoLemmix for quite some time, unless we also explore upscaling low-res graphics (though I'm skeptical on the efficacy of upscaling).  Your point about priority certainly reflects past feedback as well--hi-res graphics hasn't really come up too much until recently.  On the other hand, because the person who really wanted it was able to put in some work graphics-wise, we're probably in a situation right now where this otherwise lower-priority feature request may actually be relatively a little closer to ready compared to things like new skills.

I do wonder if it's too restrictive though to always require low-res version of graphics.
Title: Re: [DISC.][PLAYER] High-res support
Post by: Dullstar on October 09, 2019, 06:03:39 PM
I definitely think that requiring low-res graphics is too restricting. I could see an interesting case, for example, for high-res re-imagining of specific sets that wouldn't necessarily be 1:1 replacements for their low-res counterparts, which level designers could use if they wanted.
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on October 09, 2019, 06:26:22 PM
I definitely think that requiring low-res graphics is too restricting. I could see an interesting case, for example, for high-res re-imagining of specific sets that wouldn't necessarily be 1:1 replacements for their low-res counterparts, which level designers could use if they wanted.

This is specifically something that I don't want such a feature to be used for. That should be done via having a completely separate style, especially if it isn't a 1:1 replacement physics-wise.

I'm fine with not requiring low-res, but it does mean we'd need to accept downscaling of the high-res for players who are playing in low-res. Perhaps an option could be implemented to allow a style designer to choose from several algorithms to use for upscaling / downscaling (as applicable), which might somewhat mitigate the concerns around poor quality resampling. Any scaling would be done at load-time, not run-time, so it shouldn't affect performance too much.
Title: Re: [DISC.][PLAYER] High-res support
Post by: Dullstar on October 09, 2019, 11:27:54 PM
Would a restart be required to toggle between high-res and low-res? I'd probably use low-res myself for the original sets, but I wouldn't mind falling back on high-res for sets where low-res isn't available - honestly, I think that would be preferable to me compared to downscaling.

And to clarify, the non-1:1 re-imagining would be a separate style, which is why I thought of it as an example of when you might have high-res graphics, but no low-res graphics to accompany them.
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on October 10, 2019, 02:18:13 AM
Quote
Would a restart be required to toggle between high-res and low-res?

I'm currently thinking that you would not be able to change mid-level, but you could change without restarting NeoLemmix itself. Of course, I can't say for sure until I actually work on implementing it, but I think what I've described here should be acheivable. Changing on-the-fly while in-game probably isn't; the only way I could see that being feasible is if NL always rendered both resolutions and the option simply chose which one to display, which would likely have an extreme performance impact for minimal gain. (EDIT: Alternatively, NL keeps a history of every modification to the visual terrain map, and replays these upon resolution switching. While this wouldn't have the performance hit of the previous suggestion, it would instead be very code-intensive, again just for the gain of "you can switch mid-level" which I don't see as a huge deal.)

Quote
And to clarify, the non-1:1 re-imagining would be a separate style, which is why I thought of it as an example of when you might have high-res graphics, but no low-res graphics to accompany them.

Ah, gotcha.
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 04, 2019, 02:41:29 AM
Quote
Some things that I feel should be discussed:

Quote
- If a user is playing in high-res mode and encounters a level that some / all components of don't have high-res versions, should NL fall back to low-res, or try to upscale the low-res pieces? (My thought: Upscale.)

I do get the concerns some people have expressed about upscaling; but the more I think about it, the more I realise "upscale" is the only sane answer here. "Revert to low-res mode" just leads to too many situations where one piece or one graphic might end up requiring the entire game to revert to low-res mode, and that seems silly when upscaling can be done.

I do feel it would be beneficial here, to allow each style to individually specify an upscaling algorithm to use. Pixel art styles would benefit most from a different upscale algorithm than full-color art, for starters. We don't want to be overkill on this though - we want maybe 4 or 5 choices at most, probably including Nearest Neighbour as one of them (which ultimately looks no different from "use low-res, but zoom in further", except that it can be mixed with higher-res graphics instead of making the entire game fall back), not hundreds. Maybe even just three - nearest neighbour, a pixel art upscaler, and a full-color art upscaler.

Quote
- If a user is playing in high-res mode and specifically custom lemming sprites that are in use don't have high-res versions, what's preferable as a fallback: upscaling of the equivalent low-res sprites, or use of the default high-res sprites? (My thought: Again, upscale.)

I stay with "upscale" here mostly due to the concept of "don't make a special rule where one isn't needed". Like any other content, "upscale the low-res content" is the behaviour.

Quote
- Is it important for the editor to support high-res mode? This would be a lot of work to implement. (My thought: No. Editor is fine to remain low-res.)

No one seems to be concerned with this, so - at least for now (I can reconsider this later if there's demand) - editor will be low-res only.

Quote
- Should graphic sets remain required to provide low-res copies of graphics, or should it be acceptable to provide only high-res ones (and NL downscales these for players using low-res mode)? Or perhaps, should it be required for terrain (due to terrain directly impacting physics) but optional for everything else? (My thought: Downscaling is fine, as long as it's a custom-implemented algorithm and not reliant on the graphic library's downscaling algorithm.)

For the sake of physics simplicity, and in particular taking into account that it's a lot trickier to find a globally-acceptable downscaling algorithm than an upscaling one when individual pixels matter, I think part of the answer here going forward is: All styles will be required to provide low-res copies of every terrain piece. They can (but do not have to) additionally provide a high-res one. For everything else, pixel-perfect accuracy isn't critical, so downscaling might be more acceptable - I'll give some more thought to this (and of course, feel free to give your input).

Now, I've put this one last because I wanted to write about the editor first. Because that has to be taken into account here - if the editor remains low-res, then it's easiest to require all styles to provide fully low-res copies. Otherwise, the editor also needs to be able to downscale the high-res graphics for any case where only those are present. This does make me lean towards "all styles must provide a low-res version".
Title: Re: [DISC.][PLAYER] High-res support
Post by: WillLem on November 05, 2019, 12:52:35 AM
Thanks for the shout-out regarding the sprites; I had fun making these, it'd be great to see them in use!

I am obviously in 100% support of this happening, I think that NeoLemmix is a very capable Lemmings engine and offers some exciting new features which enhance and re-imagine the classic game of Lemmings. When I switch from SuperLemmini to NeoLemmix there's always the feeling that whilst the engine itself is more capable, the graphics just...aren't as pleasing, which is a shame because some users have created excellent custom content.

However, as I've mentioned in numerous other posts, there are things which make NeoLemmix way better (continued support, framestepping, in-game skill previews, in-game clear physics, the list goes on...) hence the reason I'd fully encourage a visual uplift.

To address your questions, and speaking as someone who knows very little absolutely nothing about developing and maintaining software, but who knows a lot about art, music, enjoying a good game of Lemmings and making things look pretty:

- Should graphic sets remain required to provide low-res copies of graphics, or should it be acceptable to provide only high-res ones (and NL downscales these for players using low-res mode)? Or perhaps, should it be required for terrain (due to terrain directly impacting physics) but optional for everything else? (My thought: Downscaling is fine, as long as it's a custom-implemented algorithm and not reliant on the graphic library's downscaling algorithm.)

I would suggest that this is down to the user/creator - if they want their content to be played by as many people as possible, they should provide both high and low-res graphics. Not only would this be simpler from an engine point of view (I can imagine), but it would give the creator full control over how their content will look to the end-user.

- If a user is playing in high-res mode and encounters a level that some / all components of don't have high-res versions, should NL fall back to low-res, or try to upscale the low-res pieces? (My thought: Upscale.)

I agree with IchoTolot that upscaling might look a bit odd... I think it might be simpler to make it so that if a user chooses high-res mode, they only have access to content that has high-res graphics created for it (and vice versa). This would encourage creators to provide custom graphics in both resolutions in order to reach maximum people.

- If a user is playing in high-res mode and specifically custom lemming sprites that are in use don't have high-res versions, what's preferable as a fallback: upscaling of the equivalent low-res sprites, or use of the default high-res sprites? (My thought: Again, upscale.)

Again, I would keep each mode exclusive so that content from one mode won't work in the other unless there is an equivalent graphic.

In addition to all of the above points, I would say that the priority should always be to keep things as simple as possible for everyone concerned. If it would be easier to simply upscale/downscale graphics in either scenario, then - of course, go with this option!

- Is it important for the editor to support high-res mode? This would be a lot of work to implement. (My thought: No. Editor is fine to remain low-res.)

Would this mean that the Editor couldn't be used to create hi-res content? Or would it work similar to creating a .lvl level in 1.43 and then saving it as a .ini - the Editor automatically chooses the correct equivalent graphics for the resolution? If the latter, this is absolutely fine as a way of getting levels made.

Just out of interest - if NeoLemmix Editors in the past have been more than capable of handling multiple formats and resolutions, why the shift towards restricting the format? I can imagine it's to keep things simpler...

Let me know if there's anything I can do to help with any of this. I'm currently working on:

- Hi-res Xmas sprites (these are nearly done, I'll send a pack over soon)
- Hi-res NeoLemmix-exclusive elements (buttons, pickup discs, splitters... if anyone has a list of these that'd be helpful in compiling them)
- Hi-res panel/buttons (these will have the chunky cartooniness of the Windows ones but the more crisp, familiar style of the DOS/Amiga ones - see my current low-res custom panel for an idea of what I'm aiming for. I'll create "clicked" versions of these as well in case you want the option to have tactile buttons). It would be good to back-and-forth these with someone to get a final version that everyone's happy with.

All best,

-WillLem 8-)
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 05, 2019, 01:23:41 AM
Quote
Just out of interest - if NeoLemmix Editors in the past have been more than capable of handling multiple formats and resolutions, why the shift towards restricting the format? I can imagine it's to keep things simpler...

Two factors here. Firstly, the current generation editor that works with NL V12.X.X, was an entirely new editor written from scratch - it's not even in the same programming language as the old editor. So, it wasn't so much removed, but more never implemented in the new editor in the first place.

That aside, supporting more formats makes the code more complicated. At the very minimum, code is needed to load and save the different formats. The modern editor doesn't even have this - it can only load and save in modern NeoLemmix format (while you can tell it to load a level in a few other formats, what actually happens here is that it gets the engine - which for now does have that support, though it's load-only - to perform the conversion). On top of that, either the user has to manually keep in mind what features do and don't work with the engine they're using, or else the editor must keep track of what one's being used and enable / disable options as appropriate. Then, if there's a feature that another engine supports but NL doesn't, that's an extra feature to implement support for.

Quote
Would this mean that the Editor couldn't be used to create hi-res content?

The editor would work exclusively in low-res, and the engine would display the content in either low-res or high-res depending on user preference. The high-res mode will be a purely visual change; physics remain low-res, and thus, low-res versions of the styles still need to exist (but high-res versions are optional).



In terms of content - no rush on that. My main concern for V12.8 is getting the engine support there; the graphics to go with it can be introduced over time as part of styles updates or future NL updates.
Title: Re: [DISC.][PLAYER] High-res support
Post by: Dullstar on November 05, 2019, 03:30:55 AM
I agree with IchoTolot that upscaling might look a bit odd... I think it might be simpler to make it so that if a user chooses high-res mode, they only have access to content that has high-res graphics created for it (and vice versa). This would encourage creators to provide custom graphics in both resolutions in order to reach maximum people.

That sounds like a bit of a content maintenance and user experience nightmare, to be honest. Users who select the high-res mode might be confused as to why some levels disappear when they select it, while content creators would have to either give up styles that lack high-res versions or pester people to change their graphics settings in order to play their levels. There's few enough original styles as it is anyway, as the vast majority of custom styles are game rips. Forcing people to provide two sets of graphics in order to avoid having their style cause issues with the player will exacerbate this problem as well as create bloated style downloads: high-res graphics necessarily significantly increase the size of the style, since now there's two copies of everything, but styles created in low-res may simply be upscaled to prevent the game from hiding levels from high-res users, resulting in a style that is at minimum twice (plus probably extra because the second copy has 4x the pixels) as big as it needs to be if the game could simply upscale the graphics itself.
Title: Re: [DISC.][PLAYER] High-res support
Post by: WillLem on November 05, 2019, 10:35:42 AM
I agree with IchoTolot that upscaling might look a bit odd... I think it might be simpler to make it so that if a user chooses high-res mode, they only have access to content that has high-res graphics created for it (and vice versa). This would encourage creators to provide custom graphics in both resolutions in order to reach maximum people.

That sounds like a bit of a content maintenance and user experience nightmare, to be honest. Users who select the high-res mode might be confused as to why some levels disappear when they select it, while content creators would have to either give up styles that lack high-res versions or pester people to change their graphics settings in order to play their levels. There's few enough original styles as it is anyway, as the vast majority of custom styles are game rips. Forcing people to provide two sets of graphics in order to avoid having their style cause issues with the player will exacerbate this problem as well as create bloated style downloads: high-res graphics necessarily significantly increase the size of the style, since now there's two copies of everything, but styles created in low-res may simply be upscaled to prevent the game from hiding levels from high-res users, resulting in a style that is at minimum twice (plus probably extra because the second copy has 4x the pixels) as big as it needs to be if the game could simply upscale the graphics itself.

Good point, well made. In that case, probably best to go with up/downscaling (as is Namida's preference anyway) - as mentioned in my post, I'm for whichever method is easiest for everyone.
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 23, 2019, 06:54:55 PM
(nt)
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 23, 2019, 11:56:03 PM
Getting better.

Objects are upscaled (they could theoretically be loaded from a file instead; the code's there, the graphic isn't). Everything else is currently just zoomed in to "fit" with the high-res objects. I'm not sure what the cause of the terrain glitch is near the top yet, but it's purely visual.

The upscaling is done at load-time, not run-time, so it doesn't impact performance compared to having a proper high-res graphic provided. So my focus for now, is to get everything working (just using the upscaler); once it's all working, then I'll start worrying about providing high-res graphics (most likely ripped from WinLemm or Mac).
Title: Re: [DISC.][PLAYER] High-res support
Post by: WillLem on November 25, 2019, 01:56:32 PM
Getting better.

Objects are upscaled (they could theoretically be loaded from a file instead; the code's there, the graphic isn't). Everything else is currently just zoomed in to "fit" with the high-res objects. I'm not sure what the cause of the terrain glitch is near the top yet, but it's purely visual.

The upscaling is done at load-time, not run-time, so it doesn't impact performance compared to having a proper high-res graphic provided. So my focus for now, is to get everything working (just using the upscaler); once it's all working, then I'll start worrying about providing high-res graphics (most likely ripped from WinLemm or Mac).

Looking nice so far, glitches aside. What are you using to upscale?
Title: Re: [DISC.][PLAYER] High-res support
Post by: Proxima on November 25, 2019, 04:49:18 PM
Once it's all working, then I'll start worrying about providing high-res graphics (most likely ripped from WinLemm or Mac).

I'm going to put in a vote for Mac. I grew up with that version, and the graphics look beautiful. Yes, there were slight problems with the high-res adaptation of the graphics (looking at you, Steel Mines of Kessel...) but I'm sure a few small tweaks could fix those :P
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 25, 2019, 06:31:21 PM
Getting better.

Objects are upscaled (they could theoretically be loaded from a file instead; the code's there, the graphic isn't). Everything else is currently just zoomed in to "fit" with the high-res objects. I'm not sure what the cause of the terrain glitch is near the top yet, but it's purely visual.

The upscaling is done at load-time, not run-time, so it doesn't impact performance compared to having a proper high-res graphic provided. So my focus for now, is to get everything working (just using the upscaler); once it's all working, then I'll start worrying about providing high-res graphics (most likely ripped from WinLemm or Mac).

Looking nice so far, glitches aside. What are you using to upscale?

It's a custom algorithm, fairly similar (but not identical) to Super Eagle. It only looks at the horizontally / vertically adjacent pixels (not diagonal ones) and has a few edge cases that it has special handling for. I also don't consier it "finalized" yet, I might improve it further (especially with what it does in corners). It works very nicely for pixel art styles; it isn't very impressive on full-color art (like the LPIV onwards ones) and mostly just ends up producing something similar to nearest-neighbour on those.

Once it's all working, then I'll start worrying about providing high-res graphics (most likely ripped from WinLemm or Mac).

I'm going to put in a vote for Mac. I grew up with that version, and the graphics look beautiful. Yes, there were slight problems with the high-res adaptation of the graphics (looking at you, Steel Mines of Kessel...) but I'm sure a few small tweaks could fix those :P

After a quick Google for some screenshots, I'm inclined to agree here - provided we can rip the graphics from the Mac version, and there aren't too many places where tweaks are needed. Of course, NL will still be using low-res physics anyway, so the tweaks would be purely for visual clarity anyway.
Title: Re: [DISC.][PLAYER] High-res support
Post by: ccexplore on November 25, 2019, 07:33:48 PM
provided we can rip the graphics from the Mac version

Um, hello, hi there!  That had already been done you know ;P:

https://www.lemmingsforums.net/index.php?topic=1567.0 (Lemmings)
https://www.lemmingsforums.net/index.php?topic=4078.msg73863#msg73863 (ONML and Xmas Lemmings)

Granted, there may be some further tweaks to better fit with the format expected by NeoLemmix.  Please let me know what kind of file format (eg. BMP, PNG, etc.) is preferred, and how to handle background pixels, plus whatever else is appropriate (eg. any metadata that needs to be specified outside of the graphics files), and I can modify my existing rip program to make it spit out exactly what NeoLemmix needs.

I can also take on the task of having the program compare the ripped terrain graphics with NeoLemmix's existing low-resolution graphics, to detect potential physics discrepancies to correct.  You do need to tell me how you decide to map hi-res terrain pixels to lo-res physics terrain pixels.  Mac Lemmings' rule is that at least 3 out of 4 of the 2x2 hi-res pixels must be solid for the physics to count the corresponding lo-res pixels as solid.

(I estimate this to be maybe a 1-2 day task if I put my full attention to it.  Fortunately there are some holidays coming up so I should have some time available.)
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 25, 2019, 08:53:42 PM
Having the graphics, in a form that distinguishes between "solid black" and "nonsolid" (which the posts in those linked topics suggest these rips achieve), is all that's really needed. I'll likely need to do some tidying up of them, but that's well within what I can manage (and I'm guessing 95%+ of it will be possible to automate).

There's no real "mapping high-res to low res" rule. NeoLemmix will use the low-res terrain graphics to generate the physics map, and the high-res terrain graphics to generate the visual map. Any low-res pixel (= 2x2 high res pixels) that are non solid would be erased. I'm still not sure what to do about the other way around (ie: low-res graphic says solid, but high-res pixels are transparent). It could still be useful to know, in practice, how often there's a discrepancy and where the discrepancies are, though.
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 25, 2019, 09:46:59 PM
Getting better. Terrain is actually being drawn with the upscaled pieces now (not just drawn low-res then zoomed). Lemming sprites and all UI elements are still just zoomed - only terrain and objects are actually high-resolution. Also, I think I know what's causing the glitch now, although I still have to actually fix it. As with objects, the code is there to load high-res terrain graphics, I'm just not using that side of it at the moment (just using the upscaler while testing).

The gaps on the diagonal pole to the left are (I think!) an issue with the upscaler, not the high-res mode itself, and I need to investigate this and improve the algorithm.

EDIT: And, the terrain rendering glitch is fixed - which also in the process fixed the destructive skill glitch too! :D

Not shown: Clear physics mode, which is currently very glitchy in high-res mode.
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 26, 2019, 12:21:28 AM
While still buggy in many regards, and missing some things (eg. lemming sprites are still low-res), high-res mode is now useable enough to actually play. :O

Here's a video of it in action: https://www.youtube.com/watch?v=ngR7SyyRC9w

I'd say this is well on track to indeed make it into V12.8.0. :D
Title: Re: [DISC.][PLAYER] High-res support
Post by: Dullstar on November 26, 2019, 06:50:45 AM
From what I've seen of the high res graphics, I recall the Mac ones being a bit better. I've definitely criticized WinLemm's graphics as being too shiny, which gives everything a strange metallic feel. But perhaps offering both would be best, since I imagine many players will probably continue using Low Res mode anyway and then players who want the high-res can download their preferred variant.

Since physics is going to remain low-res in high-res mode, how will this look in clear physics mode? Will the terrain shapes visually show as low-res to accurately reflect physics?
Title: Re: [DISC.][PLAYER] High-res support
Post by: WillLem on November 26, 2019, 04:04:47 PM
While still buggy in many regards, and missing some things (eg. lemming sprites are still low-res), high-res mode is now useable enough to actually play. :O

Here's a video of it in action: https://www.youtube.com/watch?v=ngR7SyyRC9w

I'd say this is well on track to indeed make it into V12.8.0. :D

Exciting stuff! :thumbsup:
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 26, 2019, 05:49:16 PM
Quote
But perhaps offering both would be best, since I imagine many players will probably continue using Low Res mode anyway and then players who want the high-res can download their preferred variant.

This has too much potential for confusion / compatibility issues IMO. I'd rather just settle on one (definitely leaning towards Mac so far) as the "official" high-res graphics for NL, and those who really feel strongly about using the other can make and share an unofficial user-side mod.
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 26, 2019, 07:53:02 PM
Quote
Since physics is going to remain low-res in high-res mode, how will this look in clear physics mode? Will the terrain shapes visually show as low-res to accurately reflect physics?

Yes. The internal physics map is still low-resolution, and clear physics mode's graphics are generated using this rather than the visual terrain map.

However, lemming sprites / object graphics would remain in high-res when using clear physics mode (though the usual recoloring would apply). Attached screenshot demonstrates this for objects (lemming sprites are still lowres + zoom at the moment). The off-by-1-pixel on the trigger areas is a known issue. (EDIT: Turns out, it's actually the terrain that's off by 1 pixel; the trigger areas are spot-on.)
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 26, 2019, 10:40:06 PM
I've taken a closer look at the Mac graphics, and noticed a few things:

1. Every graphic (a terrain piece, or a frame of an object / lemming animation) is a separate file. Annoying, but manageable.
2. The whitespace (or rather, blackspace) on the bottom and right of every piece - but not the top or left - is culled. This is probably the easiest issue to deal with.
3. No matter what rule is used to translate 2x2 high-res pixels to one low-res pixel, the terrain is not always physics-identical. For example, see the attached image - yellow pixels are solid on Mac but not DOS; red pixels are solid on DOS but not Mac; green pixels are solid on both; black pixels are not solid on either. (For the graphic, I translated upwards - a solid pixel in low-res = all four pixels solid in high-res.)

The 3rd one is the biggest issue, and I suspect that manual work would be needed to resolve this.

With this being said: I have not by any means confirmed that WinLemm's graphics don't have similar issues. They very likely do.

If issue #3 does exist to a significant extent in both Mac and WinLemm, I will probably not make the effort to actually prepare high-res graphics myself, as I feel my time would be better spent elsewhere. Of course, I'll still implement the support for it in NL - it'll just be up to someone else to actually convert / prepare the high-res graphics.
Title: Re: [DISC.][PLAYER] High-res support
Post by: WillLem on November 26, 2019, 11:57:12 PM
3. No matter what rule is used to translate 2x2 high-res pixels to one low-res pixel, the terrain is not always physics-identical. For example, see the attached image - yellow pixels are solid on Mac but not DOS; red pixels are solid on DOS but not Mac; green pixels are solid on both; black pixels are not solid on either. (For the graphic, I translated upwards - a solid pixel in low-res = all four pixels solid in high-res.)

...

I'll still implement the support for it in NL - it'll just be up to someone else to actually convert / prepare the high-res graphics.

What would need to be done to sort this out, graphics-wise? Is a simple case of recoloring or would they need to be re-shaped to match the physics?
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 27, 2019, 02:37:17 AM
Basically - the high-res graphic should match the shape of the low-res graphic. Or in other words - if you were to scale it up "nearest neighbour", every low-res pixel that's solid should correspond to a region of 2x2pixels on the high-res graphic where at least some of it is solid; and every low-res pixel that's not solid should correspond to a region of 2x2 pixels on the low-res graphic where none are solid.

This is only critical for terrain. For objects / lemming sprites, this doesn't matter. I also suggest waiting until an exp / RC build of NeoLemmix with the high-res feature is available before trying to work on this - it'll be a lot easier when you can test it in-game.
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 29, 2019, 07:53:48 PM
You've seen lemmings being saved in high-resolution. How about some lemmings being nuked in high-resolution?

https://www.youtube.com/watch?v=hruA7ZQIT1o
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 29, 2019, 10:41:42 PM
And, just a screenshot rather than a video this time, but high-res mode is practically complete now (bugfixes aside of course, I'm sure there'll be plenty that end up being needed). The only thing that's not currently working correctly is the minimap.

Oh, "but the minimap is part of the skill panel"? Yeah, I decided to high-res the skill panel too. I won't be changing anything outside of gameplay (menus etc) for V12.8.0 though; that, if it comes at all, will come later.

EDIT: Shrunk the image to half size, since no clarity is lost by doing so.
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 30, 2019, 12:09:38 AM
High-res mode is basically completely functional now. :D

https://www.youtube.com/watch?v=W1HQFnrSv4E
Title: Re: [DISC.][PLAYER] High-res support
Post by: Proxima on November 30, 2019, 10:27:15 AM
Oh, "but the minimap is part of the skill panel"? Yeah, I decided to high-res the skill panel too. I won't be changing anything outside of gameplay (menus etc) for V12.8.0 though; that, if it comes at all, will come later.

Any chance of getting the Mac version skill panel? It's really nice 8-)
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on November 30, 2019, 06:07:41 PM
Oh, "but the minimap is part of the skill panel"? Yeah, I decided to high-res the skill panel too. I won't be changing anything outside of gameplay (menus etc) for V12.8.0 though; that, if it comes at all, will come later.

Any chance of getting the Mac version skill panel? It's really nice 8-)

The lemming icons from it won't happen. This is because NL generates the lemming icons using the actual lemming sprites used on the level.

The rest of the panel, I don't see any major technical obstacle, though I do have a personal preference towards keeping it in the DOS style (just higher resolution). This is not, though, to an extent that I won't consider anything else - if there's enough demand, I can reconsider. And of course, even if I don't, if the sizes fit (or someone can be bothered making the needed adjustments), there's nothing at all preventing a user-side mod being made and shared.

There is one minor technical obstacle - that we don't (as far as I know) have access to Mac panel graphics with no skill / icon drawn on them. NeoLemmix relies on having separate source images for the panel background and the panel icon / etc. However, this is something that can be resolved with a little bit of time in a graphics editor app - I had to do much the same to get the DOS panel graphics into such a format.
Title: Re: [DISC.][PLAYER] High-res support
Post by: WillLem on December 04, 2019, 06:43:17 AM
Any chance of getting the Mac version skill panel? It's really nice 8-)

There is one minor technical obstacle - that we don't (as far as I know) have access to Mac panel graphics with no skill / icon drawn on them. NeoLemmix relies on having separate source images for the panel background and the panel icon / etc. However, this is something that can be resolved with a little bit of time in a graphics editor app - I had to do much the same to get the DOS panel graphics into such a format.

This is the closest I could get to the Mac icon - it's basically an Amiga icon (on which the Mac one is based) but slightly re-tinted here and there. I think it looks quite nice! :)
Title: Re: [DISC.][PLAYER] High-res support
Post by: namida on December 04, 2019, 08:45:42 AM
Here's a video with WillLem's high-res sprites. :D

https://www.youtube.com/watch?v=2e4BsoXtWnI

Still a few minor kinks to iron out, but it's looking good. :D
Title: Re: [DISC.][PLAYER] High-res support
Post by: Strato Incendus on December 04, 2019, 10:55:45 AM
I was never aware that the Glider actually holds on to his parachute with both hands, i.e. like the Parachuter in Lemmings 2: The Tribes :D . I thought it was just a slightly wider "umbrella", compared to the Floater, i.e. held-on with just one hand.

As such, the Glider sprite looks especially good on the lemming - the sprite for the panel, in contrast, does not, in my opinion: The Glider's feet are cut off at the bottom of the screen. Maybe a slight readjustment of the position of the sprite on the skill panel should be considered? ;)
Title: Re: [DISC.][PLAYER] High-res support
Post by: WillLem on December 04, 2019, 05:13:56 PM
Here's a video with WillLem's high-res sprites. :D

https://www.youtube.com/watch?v=2e4BsoXtWnI

Still a few minor kinks to iron out, but it's looking good. :D

This is looking ace! It's great to see these in action.

I've made some subtle changes to the size of the glider sprite so it should be a bit less of a jump as compared to the walker/faller, and may be easier to fit better onto the panel now as well.

:thumbsup:
Title: Re: [DISC.][PLAYER] High-res support
Post by: Strato Incendus on December 04, 2019, 08:23:29 PM
Are those sunglasses new? :D I certainly didn't notice them before!
Title: Re: [DISC.][PLAYER] High-res support
Post by: WillLem on December 12, 2019, 11:58:02 PM
Are those sunglasses new? :D I certainly didn't notice them before!

Yes! I just always see pictures of hang-gliders wearing sun goggles, so thought it'd be a fun inclusion to the hi-res sprite. :thumbsup: