lemmix player revisited

Started by EricLang, March 02, 2020, 05:47:35 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

EricLang

Able to compile my old Lemmixplayer again about 15 years later, I started refactoring it, cleaning it as well as speeding it up because of some new language features like inlining.
Instead of compiling different lemmixplayers for each DOS-game I decided to include all DOS-games in it as a resource. After that it occurred to me that supporting custom levels would be nice as well. Just looking in a "styles" folder and analyzing the files. Because there are a *lot* of custom LVL files and .DAT files around.
In the near future (and after beta-testing the source code) the exe will be available for testing.

When supporting custom levels it will not be possible to decide - reading the LVL or DAT files - what graphics should be loaded unless there are ground and vgagr files in the folder as well.
In case of LVL files only probably some config-file should be included.

I'll post a message here when the player is ready for testing and share the github location.

namida

#1
I strongly suggest you use the source code from my modified versions (available on NeoLemmix.com - to be clear I don't mean NeoLemmix itself, but rather the updated versions me and ccexplore produced of vanilla Lemmix) - or at least see what's changed and reproduce these changes.

This has several fixes compared to your original, by myself and ccexplore. Off the top of my head, the important ones are:
- Triggered traps are too fast on your version. They finish 1 frame quicker than they do on DOS.
- Your version does not reproduce the nuke glitch or the pause-for-time glitch.
- Your version doesn't reproduce certain glitches relating to mouse positioning when assigning skills.

There's probably more.

(I'm assuming here, of course, your goal is still "accurately reproduce how DOS lemmings works", rather than "create a new, glitch-free engine".)

I should also mention - Lemmix isn't really used these days except to play the original levels for challenge purposes; NeoLemmix is where most of the custom content is nowdays. You're welcome to help out on NL - if you're good with optimizations, that could especially be useful, as that's one thing I'm not very good with myself, and NL could really use some optimization to speed things up (especially for the high-res mode) - of course, this must not be at the cost of "physics are now different" or "features are removed".

EDIT: Now that I think about it, "reproduce the changes yourself" is probably the better option here. My coding ability was not the greatest back when I made my upgrades to it; so chances are they're not very well-written, even though they do ultimately work. (ccx's on the other hand should be fairly solid, but I'm not sure if there's a copy of the source with *only* his changes.)

Download link for my-updates to Lemmix source: https://www.neolemmix.com/download.php?id=64
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

EricLang

That is interesting. Indeed the plan is to stay with the DOS versions. A next seperate version will be high-res and hardware accelerated etc.
I will certainly try to find the shortcomings in the player you mention. Although I am in a state of refusal to reproduce the nuke glitch.
Optimizing is a reasonably strong side of me. When I have the time I will for sure have a look at Neolemmix.

EricLang

O wow: all the old stuff is still in neolemmix! (and of course some new I see).
When I finished my lemmixplayer I will come up with some ideas. Give me some time!

namida

Quote from: EricLang on March 02, 2020, 10:23:02 PM
That is interesting. Indeed the plan is to stay with the DOS versions. A next seperate version will be high-res and hardware accelerated etc.
I will certainly try to find the shortcomings in the player you mention. Although I am in a state of refusal to reproduce the nuke glitch.

The two bolded parts seem self-contradictory to me. Surely, if your goal is to accurately reproduce DOS, it should accurately reproduce all DOS glitches? Of course - there aren't that many levels where it makes a difference, and those where it does it's usually very obvious whether a nuke-glitch solution passes or fails, but there are borderline cases... (indeed - I recall, ccexplore left a comment next to where you said "we will NOT be simulating the nuke glitch" - where he said "sorry, nuke glitch re-added by popular demand". This implies users really wanted it to be reproduced.)

Also - to be clear, because I don't think I made this very clear - the link above is the source code for my slightly-updated versions of Lemmix. This is still Lemmix; it remains true to DOS, and just fixes a few things Lemmix got wrong before (and adds a couple of cosmetic features).

Check the "Welcome to NeoLemmix" topic over on the NL board if you want to see NL source code. (Note - NL won't compile on D7, you'll need a newer version. I'm using 10.3, though it will probably compile at least as far back as XE6, as we were using that until quite recently.)
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

#5
Allow me to begin this post by extending my warmest regards and thanks to you for pioneering Lemmix, which has since been developed into NeoLemmix and remains, in my honest opinion, the absolute best option for playing the classic game on a modern platform. Big kudos! :thumbsup:

Just to ask the question: what's the motivation behind wanting to stay faithful to the DOS version, in particular? The original game was designed for the Amiga using Deluxe Paint II, and is (IMO) a far superior version of the game, if only aesthetically. The DOS version has some questionable colour schemes going on and all the writing is squished vertically and difficult to read.

I originally discovered this forum after playing Lemmings on SuperLemmini, an engine which I still think is gorgeous enough for Tsyu to consider upgrading a bit to keep up with the features that make NeoLemmix so good.

If you'll indulge me for a moment, take a look at the differences between each version:

Here's the original Amiga title screen. Note that, whilst everything is probably a bit too big, everything is in proportion and the colours are fairly pleasing to the eye:



The Lemmix/NeoLemmix title screen squishes these images vertically, remaining faithful to the DOS version but ultimately resulting in a less pleasing visual image. However, the relative sizes of each object on the screen are arguably better in relation to each other:



The SuperLemmini title screen, regrettably, makes no attempt whatsoever to replicate the original Amiga title screen and is arguably the worst aspect of Lemmini/SuperLemmini, visually. The scroller text is squished horizontally this time, and stands out as being a fairly unconsidered issue. It's a shame because pretty much everywhere else, SL looks fantastic. Note, however, that the text is much more striking and the colours are stronger. In the context of the title screen, it looks perhaps a bit too bold, but elsewhere in NL these enhancements work a treat:



Moving on to the level pre-screens, here's the original Amiga version (forgive me, I've had to screenshot this from a YouTube video as I no longer have a working Amiga emulator handy). Note the pleasing colour scheme and easy-to-read text; the only issue I'd have with this version is that the level preview is too small:



The SuperLemmini version does a great job of replicating this, enhancing the colours whilst also tightening the text up slightly, to a satisfying effect. This would have allowed for a bigger level preview as well, but it inexplicably remains a bit too small and stretches it horizontally ???:



The Lemmix/NeoLemmix version, again, looks identical to the DOS. The level preview is nice and big this time, which is great. But the text is squished vertically and relatively difficult to read as compared to the other versions:



I think what I'm getting it here is that the option is there to make improvements: have a bigger level preview, easier to read text, a better colour scheme. Why try to replicate a version that is still available in DOSBox for those that really want it?

If the answer is: purely for sentimental reasons, that's absolutely fair enough. But if the intention is then to publish the engine and make it widely available, surely it's worth considering the possibilities for making an improved, dare I say - definitive - version of the Lemmings platform, that incorporates all the best elements of the various versions available? If I had the coding talents that you guys possess, I would no doubt aim for just that!

At the very least, I'd be more than willing to lend my talent for visuals & graphics to provide custom text, background, menu and pre-screen graphics with enhanced colours and more pleasing proportions, if that would help. Just say the word!

EDIT: This goes out to all of you btw; Eric Lang, Namida and ccexplore - I'd be happy to do the above for either/both platforms.

Proxima

Quote from: WillLem on March 03, 2020, 12:55:39 PMI think what I'm getting it here is that the option is there to make improvements: have a bigger level preview, easier to read text, a better colour scheme. Why try to replicate a version that is still available in DOSBox for those that really want it?

From the community point of view: because Lemmix is an invaluable resource for challenge topics. All the same results could be obtained in DOSBox, but Lemmix's control and replay features make it much easier to navigate from having an idea to knowing whether it works or not, as well as providing replays to prove our results and allow anyone to look at how they were achieved.

Sure, the Amiga version was the original and we could have chosen that version as the basis for our results; but now that we have such an extensive set of results, there is no question of ever switching over. The DOS version was chosen as primary because it was the version with the most familiarity among the community, and also precisely because Lemmix was available for result verification.

namida

Quote from: Proxima on March 03, 2020, 03:33:44 PM
Quote from: WillLem on March 03, 2020, 12:55:39 PMI think what I'm getting it here is that the option is there to make improvements: have a bigger level preview, easier to read text, a better colour scheme. Why try to replicate a version that is still available in DOSBox for those that really want it?

From the community point of view: because Lemmix is an invaluable resource for challenge topics. All the same results could be obtained in DOSBox, but Lemmix's control and replay features make it much easier to navigate from having an idea to knowing whether it works or not, as well as providing replays to prove our results and allow anyone to look at how they were achieved.

Sure, the Amiga version was the original and we could have chosen that version as the basis for our results; but now that we have such an extensive set of results, there is no question of ever switching over. The DOS version was chosen as primary because it was the version with the most familiarity among the community, and also precisely because Lemmix was available for result verification.

Another reason that Proxima missed: DOS was mimicked because details were available on DOS physics. ccexplore did some very extensive reverse-engineering of the DOS version to figure out exactly how physics work. While we're aware of some of the differences between DOS and Amiga, we don't have the same level of knowledge of Amiga's exact workings.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

EricLang

Reproducing DOS is maybe personal. I have these memories of the old DOS time and my LemmixPlayer fully fulfills my expectations, while adding some nice features.

I am aware of the stretched images. In particular the logo, which is nice if you make the width exactly twice as small. In my next version I will check this out.
And rethink the nuke glitch or at least make it optionally available :-)

I never played amiga and I played a little bit of Lemmini. Never played the mac and I played with WinLemmings.
Lemmini and WinLemmings felt to "slow" or "sluggy" in my opinion. Not very responsive somehow.

The next plan of me is to make the higher resolution version with some real nice graphics, using OpenGL or something like that. And leaving the LVL format forever then.
And togther with that a A.I. levelcreator, which I already mentioned here.

I will have a look at the NeoLemmix newest version. I am using 10.3 as well for compiling.
I presume there is a download link in that post.

ccexplore

Quote from: WillLem on March 03, 2020, 12:55:39 PMThe DOS version has some questionable colour schemes going on and all the writing is squished vertically and difficult to read.

I already covered this previously.  The vertical squish is really a bug/setting thing with DOSBox that unfortunately Lemmix and NeoLemmix wound up copying.  The pixels on the actual VGA hardware are non-square for the graphics modes used by the game (640x348 and 320x200), while nowadays all native graphics modes supported by your monitor would have square pixels.  An accurate emulation should therefore have applied vertical stretching when displaying the graphics, but as you can see, even DOSBox doesn't do that, at least with its default settings.  It is that inaccuracy that led to things looking squished.  It's especially noticeable on title screen because the 640x348 mode is quite rectangular (square pixels would've called for 640x480).

If you played the original games on actual DOS you will see no squishing.  Even with DOSBox, there's a decent chance that if you played in fullscreen mode, it might be able to display the title screen without looking squished.

As for color differences, I assume you are talking specifically about the pre-screen texts.  I suspect this is at least partly due to technical limitations on DOS's VGA display hardware.  The game uses graphics mode that can only display 16 colors at a time.  DOS Lemmings actually already used an advanced technique on the pre-screen to allow the level preview to use a different set of 16 colors from the rest of the screen, although I don't remember whether it is able to do so always versus only with the "high performance" setting.  The DOS version also has to support less capable video hardware like EGA, which has even more color limitations.  So while it's unfortunate that the DOS version is less colorful there, it was probably necessary at the time for the game to run on older DOS PC hardware that people still have at the time.

Quote from: WillLem on March 03, 2020, 12:55:39 PMI think what I'm getting it here is that the option is there to make improvements: have a bigger level preview, easier to read text, a better colour scheme. Why try to replicate a version that is still available in DOSBox for those that really want it?

As I recall, Lemmix started off not including any of the graphics assets, the setup requires you to point to the files from an existing installation of the game on your PC.  This avoids some copyright issues, though obviously it later evolved in a direction where we basically picked convenience over compliance, by including the copyrighted stuff.  But back when the grahpics assets weren't included yet, it would've been vastly more painful to require people to get files/data from a non-PC version like Amiga in order to use Lemmix.  And also from programming standpoint, since Lemmix already needs the code specifically to extract from DOS files, it also makes less sense to then have to spend extra programming in order to also extract from other versions that typically stored their graphics differently.

Lemmix also started off addressing the major problem of level editing on PCs.  There actually was a "LemEdit" level editor already that was written to run on actual DOS.  But for a while it doesn't run well on DOSBox, to the point that it is almost unusable.  And ultimately LemEdit was always going to be limited to the fact that it is a DOS program.  Lemmix is effectively the first level editor that runs natively on modern versions of Windows (by that I mean XP and beyond).  At the time, given what editors had been previously available, many custom levels were designed to run on "Customized Lemmings", which is a modded version of DOS Lemmings that support custom levels.  So again, it makes sense for Lemmix to evolve at the time as a more Windows-compatible replacement for those older counterparts, and thus to be written specifically with DOS Lemmings in mind.

And you know, despite some shortcomings, most people are familiar with DOS Lemmings, it is in some ways uncontroversial in that aspect.  You assume everyone has the same aesthetic tastes as you but that probably won't be the case.  For a player and editor that was already written (at the time) largely with DOS Lemmings in mind, might as well have other aspects stick with DOS Lemmings.

Quote from: WillLem on March 03, 2020, 12:55:39 PMAt the very least, I'd be more than willing to lend my talent for visuals & graphics to provide custom text, background, menu and pre-screen graphics with enhanced colours and more pleasing proportions, if that would help. Just say the word!

I'll let EricLang decide, although at this point I suspect such efforts are probably better spent on NeoLemmix, since much morel levels nowadays are created from and for NeoLemmix, as opposed to DOS Lemmings.  That said, I suppose he could probably at least make it easier for others to mod some of the graphics used in LemmixPlayers (by looking for loose files in addition to what's embedded in the EXE, like a "LookForLVLFiles" setting but for graphics).

WillLem

#10
Just to say it again: I think Lemmix/NeoLemmix is great, gameplay and physics-wise: whatever version is being emulated in this regard, it works well and is a joy to use. All the work you guys have done has been massively worth it, no question of that whatsoever.

I think my issue here is (and always has been) specifically with the graphical representation. To have been a part of realising the HR mode now available in 12.8 has been a great experience, I guess what I'm saying is - why not take it to the next level and have a really good look at the menu, title screen, pre/post-level screens?

I could probably have made that point somewhere else, in all fairness. :crylaugh: It is good to know what inspired the DOS emulation though, and there is no question of the success of Lemmix as a platform.

I've created a new topic/poll to avoid this tangent going any further on this particular post.

All the best with the Lemmix developments, EricLang! It's great to meet you btw.

EricLang

All very interesting. I probably can use some graphics help and will come here soon with details.
By the way: I just looked - for the first time(!) - at some custom levels which I still have on my computer. Some insanely difficult. It is a joy to see!

WillLem

Quote from: EricLang on March 03, 2020, 11:16:47 PM
All very interesting. I probably can use some graphics help and will come here soon with details.
By the way: I just looked - for the first time(!) - at some custom levels which I still have on my computer. Some insanely difficult. It is a joy to see!

I'll keep an eye on the topic then and help you out wherever I can, looking forward to it!

What format are your old levels in? It'd be great to give them a play through. :lemcat:

Turrican

#13
Quote from: WillLem on March 03, 2020, 11:34:19 PM
What format are your old levels in? It'd be great to give them a play through. :lemcat:

Lemmix levels can be played either as levelpacks or single levels . Levelpacks have the.dat extension and single levels have the .lvl extension.

Almost every custom levelpack that has been made for Lemmix , can be found on the lemmings level database. It contains levelpacks for Lemmix and Lemmini, but the vast majority of levelpacks are for Lemmix (each levelpack that has the .dat extension works n Lemmix). Many of the levelpacks have ratings for enjoyability and difficulty.

Link for the database: http://lemmings-db.camanis.net/levelpack/list

For single levels , you can find them on the "Lemmix level pack topic" on the "levels for other engines" section of the forum.

If you want to try these levels/packs before EricLang has his new player ready, you can use either vanilla Lemmix or Custlemmix . You can find basic info about both of these on the "how to play dat and lvl files" thread on the "help and guides section" ,and other members here can give you any information , you may need on how to setup them.

On the vanilla Lemmix you can manually select whatever level you want from a pack. Custlemmix will have you starting from the first level , but there is a cheat to skip levels and go to the level you want to try (type CHEATCODES in the insert password for levels screen , and press 5 during gameplay, if I remember correctly).

One thing to remember is that Lemmix levels had been created with either "dos original lemmings" viewing style (physics mode) , or with "custom lemmings" (custlemm) viewing style (physics mode).

Dos original lemmings : It emulated the dos physics (as it's name suggests of course)
Custom lemmix (custlemm) : It emulated the physics of a program that existed before Lemmix, called custlemm . If I remember correctly custlemm physics were heavily based on onml physics, and the main differences between dos and custlemm, were that custlemm allowed for 3 pixels higher splat height, and the potitioning of the lemmings when they entered a level was different by 1 pixel. That could affect solutions in some levels, but in most levels it would not make a large difference. Both programs allowed you to switch between dos and custlemm viewing style.

Levels by authors like Namida, Nepster and Bulletride had been made with dos viewing style in mind.
Levels by authors like Clam, Tseug, H0ru5 and the earlier contest/level jam levelpacks had beeen made with custlemm in mind.

There are lots of levelpacks for Lemmix if you wish to try , two packs I would strongly suggest you , are the Cstame packs (cstame 1 & 2) by Clam. You can find both of them in the database , and they both follow the same Idea you had in one of your packs (to take the tame levels and make them more challenging).
My Youtube channel ( Turrican Lemm )  :
https://www.youtube.com/channel/UCYGFBOHdYITHlsqa203Tu8Q

namida

QuoteLevels by authors like Namida

Levels by me should be played on NeoLemmix. (Except the Lemmings 3D ones of course.)
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)