Author Topic: Working on Lemmix again  (Read 11869 times)

0 Members and 1 Guest are viewing this topic.

Offline EricLang

  • Posts: 464
    • View Profile
Working on Lemmix again
« on: December 26, 2013, 10:56:25 AM »
Since a long time started with the Lemmix program (editor and player and database in one) again. The program can import different types of lemmings and custom levelpacks.
I was wondering if it is an idea to add some drawingmodes:
- tile flip horizontal
- tile rotation (90, 180, 270 degrees)
- tile stretchfactor (stretch horizontal and vertical)

(I added 2 stretch examples (x=4, y=1.5) and (x=0.5 y=2)

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Working on Lemmix again
« Reply #1 on: December 26, 2013, 11:36:28 AM »
Rotation is common in similar games, it's very handy to have that. Horizontal mirroring then is merely vertical mirroring with a half turn.

Stretching, I'm hesitant about this . With the low overall resolution, stretches by more than 1 become ugly. Strechtes by less than 1 are less problematic, probably depend on the piece.

-- Simon

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Working on Lemmix again
« Reply #2 on: December 26, 2013, 12:03:54 PM »
If you're going to add custom features, I think the first thing you should look at is a custom (or even just extended) level format that's suited to retaining the traditional gameplay style, but overcomes the limitations on steel areas etc. I myself considered extending Lemmix to do this at one point; but by the time I was familiar enough with the code to actually do so, a great majority of LPII had already been designed tuned to the existing limitations so I saw little point. :/

Also - I'm not sure if you saw, but ccexplore made his own modifications (adding nuke glitch, an emulation of pause-for-time glitch, and some others that weren't reproduced properly, I think he might've also improved the support for reproducing glitches in replays), you might want to work from that? You can grab his modified source code here:
http://www.mediafire.com/download/uhk6207aw9smtmd/LemmixPlayer_ccexplore.zip
My Lemmings 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)

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #3 on: December 26, 2013, 12:49:00 PM »
I will take a look at that ccexplore thing :)

Offline Proxima

  • Posts: 4562
    • View Profile
Re: Working on Lemmix again
« Reply #4 on: December 26, 2013, 04:09:43 PM »
The stretched tiles are rather ugly. Perhaps it would be better to offer scaling (i.e. stretch x and y by the same factor)?

Also, please can you make it so pressing R comes out of fast-forward mode?

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #5 on: December 26, 2013, 08:21:37 PM »
There are many Lemmix feature requests. Maybe a 'sticky' Lemmix request list thread is an option?

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Working on Lemmix again
« Reply #6 on: December 26, 2013, 08:24:07 PM »
If you're picking up development again, an entire board might be better :-) One thread per feature is much more adequate. I'll PM Mr. K.

-- Simon

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #7 on: December 26, 2013, 08:40:37 PM »
Okidoki, thanks.
It would be nice to have things gathered here, instead of gathering them all by my self :)

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Working on Lemmix again
« Reply #8 on: December 27, 2013, 02:10:57 AM »
If you want to add compatibility for the LPII gimmicks into it (I don't think you would since it's kinda a specific-to-LPII thing, but you might), I can send you the LPII source code too. (Can't do much about LPDOS, I lost that ages ago, but the only modification in it IIRC (apart from the different number of ranks/levels etc) was the bombers, which LPII has the same modification.)


Also, a discrepancy between Lemmix and the DOS games that wasn't fixed in ccexplore's updates because it wasn't even known at the time:
As you know, the terrain pieces are planar bitmaps where each pixel is represented by a color index from 0 to 15. And as you probably know, the official graphic sets only ever use colors 8-15 for terrain pieces (0 to 7 may be used in objects, but never terrain). If you make a custom graphic set that DOES use one of the fixed colors in a terrain piece, it behaves differently in DOS Lemmings than in Lemmix. In DOS, it will be drawn correctly, but will NOT be treated as solid. In Lemmix, it behaves just like any other pixel of terrain.

Also, ccexplore's documentation of the graphic set format states that the 4th plane and the mask for terrain pieces is in fact the same data in all the official sets, but he isn't sure if that has to be the case for a custom one. It does not - you can have a seperate 4th plane and mask. Lemmix already handles this correctly, though - just pointing out in case you need to know the actual answer at some point.
My Lemmings 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)

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #9 on: December 27, 2013, 08:30:07 PM »
Thanks. I would like to have information on Lemmings 2 (Tribes I hope you mean, because 3D is not Lemmings in my view) because they would be nice to import and play (already trying to create a plugin system for alternative mechanics).
I hope a Lemmix thread is created somewhere for adjustments.

The first thing I will do is release a test-version of the player, including a prefab database.
(Player and Editor will both be in 1 program BTW, the editor is more difficult).

In the new thread we also could discuss mechanics without the dos-bugs and limitations.




Offline mobius

  • Posts: 2747
  • relax.
    • View Profile
Re: Working on Lemmix again
« Reply #10 on: December 27, 2013, 10:55:48 PM »
If you'd like some ideas here is (just my personal opinion) of what should be a priority on Lemmix: [until there is a better place to put it I'll just write this here: I'll move it if/when we get a sticky topic or something]

-on the editor-
Having level files/replay files that are editable text files would be nice. Lix does this.

once I got used to the editor I actually found it very easy to use and I like it now. There are some issues however:

Please fix the glitch where if you re-size the panels on the bottom of the editor hot keys stop working. I still have not gotten any confirmation that this happens to anybody else but it's annoying + it caused me to think there were no hot keys for a long time.

-somehow make it easier for new users to figure out the controls. Maybe install one of those "tips" menus that pop-up when you start the program (be sure u can turn this feature on/off for experienced users)

-something brand new I thought of from a Chips Challenge editor: A feature that calculates where a lemming will walk; in the form of a line that goes through the level.
For example, the line goes down from the entrance then goes on the ground, falls if there is a gap in the terrain, ends if it goes into water,


-THE PLAYER-
The current version of the player almost perfectly emulates the original DOS. So for people who want that, they already have it. I strongly think we should move to make Lemmix a new game which FIXES all of the old glitches and does not emulate the original game.

-trigger areas are no longer restricted to any useless grid

-steel is fixed. Lemmini's steel mechanic is pretty sound. I suggest you look at that or Lix to see an example. There is a small issue I observed in Lemmini that if a Lemming explodes on a thin piece of steel with terrain underneath it; the steel will not be destroyed  but the terrain underneath it WILL be destroyed if the steel is thin enough. I've never tested this in Lix I'm curious what others think about this.

-trigger areas for the exits should all be the same; the ONML triggers are too small
-Most of the traps in current Lemmix are ok (I think//not including the grid problem). Except: The needle trap in Pillar, It ought to be the full length of the device instead of the small square it currently is. see Lemmini.

-Fix asymmetry issue. Builders should build exactly the same going left or right, blockers should work ditto etc...

-fix all the glitches with the skills. We ought to focus on the major ones first and some of them are obscure enough you shouldn't feel you need to tackle all of them at once.
-miners pass through 1 pixel gaps
-fallers can exit from any height

-of course I am also a fan of adding new features. I personally some prefer mechanics from Lemmings Revolution. I recommend you take a look at the game to see for yourself.

http://www.youtube.com/watch?v=0AROar4q8OM

this level demonstrates one of my favorite features of this game.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Working on Lemmix again
« Reply #11 on: December 28, 2013, 12:34:52 AM »
Thanks. I would like to have information on Lemmings 2 (Tribes I hope you mean, because 3D is not Lemmings in my view) because they would be nice to import and play (already trying to create a plugin system for alternative mechanics).
I hope a Lemmix thread is created somewhere for adjustments.

The first thing I will do is release a test-version of the player, including a prefab database.
(Player and Editor will both be in 1 program BTW, the editor is more difficult).

In the new thread we also could discuss mechanics without the dos-bugs and limitations.

By LPII I was meaning my game, Lemmings Plus II. It uses Lemmix as the base engine but has a few tweaks too. Have a look if you haven't already:
http://www.lemmingsforums.com/index.php?topic=879.0
One way right miner glitch is disabled, but Lemmix already has support for turning that on or off. That aside, the only difference that's global to the whole game is how the bombers work - you'll notice it VERY quickly. Beyond that, a few specific levels have gimmicks (similar to Superlemming from ONML) - Nice 9 and 15, Cheeky 8 and 10, Sneaky 4 and 14, Cunning 19, and Genius 9 and 16. Also, there's added functionality for secret levels.

Quote from: Still-undiscovered (by ANYONE) LPII spoiler, highlight to read
And Cunning 21 for the list of level with gimmicks.


That being said, integrating L2 into it as well might not be a bad idea. I also very much like your idea of plugin systems. Here's a thought - why not have some form of rudimentary "interpreted" language that can be loaded that define how these work? Perhaps just for each specific frame a lemming can be in, a list of what masks to apply, where to move the lemming, etc? Hopefully you understand what I'm saying, I don't think I'm explaining this very well...


Another thing to consider is what to use for a level format. Ideally, we don't want to be adding even MORE new formats, we've already got 3 in active or semi-active use (LVL, INI and Lix's format) plus how many more that are no longer used (Cheapo LEVs come to mind)... but at the same time, no existing format is completely suited to this... INI comes close, but text-based format isn't too ideal I would think (plus, Lemmini is based on a 2x resolution). Though I don't know the details of Lix's format, maybe it's more suitable.


Another thing I'd suggest, do you think it's worth choosing a name not so similar to "Lix"? (Although technically, I believe Lemmix was around first...)
My Lemmings 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)

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #12 on: December 28, 2013, 09:56:49 AM »
Could you give me a downloadlink of the exe and source code?

I was indeed planning to change the file format drastically. An SQL database with everything in it.
But I am still in a philosofical state about this...
A text based database does not appeal to me...

This is the (simplified) structure now, which still lacks sound, music, replay.
Code: [Select]
STYLE
    TRIBE
        LEMMING
    TILESET
        TILE
        STRUC
    PACK
        SECTION
            LEVEL
                LEVELSTRUC
                LEVELTILE
                LEVELMATERIAL (steel)

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Working on Lemmix again
« Reply #13 on: December 28, 2013, 10:09:41 AM »
I would reccomend sticking with a binary format in normal files... it's way easier for other apps to support, that way. Unless you're planning on not making it suitable for that?

Do you mean for LPII? One sec, I'll upload and PM it to you.
My Lemmings 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)

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #14 on: December 28, 2013, 10:16:13 AM »
I mean LP II yes. Never saw it!
There are soo much formats thinkable. But I made the program more or less independant of storage so I can always add or delete something :)

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #15 on: December 28, 2013, 02:51:56 PM »
A little thought on the triggereffects in the game and the dos limitations.
A solution for a 'perfect' mapping of the trigger effects could be a layered approach:

for each pixel in the gameworld I could use an arbitrary number of 'layers'.
An approach could be:
For each pixel we create 8 layers for the trigger effects. This way we could have 8 overlapping triggerarea's.
When scanning we go through these 8 layers and determine if anything is there to be triggered.
Another approach could be to make the layers unlimited.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Working on Lemmix again
« Reply #16 on: December 28, 2013, 02:53:54 PM »
Wouldn't it be easier to just check for every object, and perhaps create a temporary object for blockers / steel areas? (Well, not so temporary for steel.)
My Lemmings 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)

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Working on Lemmix again
« Reply #17 on: December 28, 2013, 03:18:18 PM »
The lookup map in Lix has a two-byte word per pixel, all sorts of effects can overlap there.

If you hash everything in the end, the digest doesn't become longer, it might only be harder to compute. But hashing 1 MB = playing area of 1000 x 500 should still be fast enough.

The lookup map is most efficient during the game when only the type of object matters (water, fire, steam). But even when the particular object must be retrieved back (triggered trap that must run through its animation, goal that is associated to certain player), it's still an improvement over iterating over all objects every frame every lemming.

-- Simon

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #18 on: January 08, 2014, 09:28:15 AM »
I was wondering if I should release pre-versions of "Lemmix XL" to get feedback.
If I do so the first version will include
- a test database with Original Dos Lemmings
- a database explorer (view everything in it)
- a level viewer

Maybe the test database will contain L2 data as well. Working on that....
It is important that different platforms can be supported by the database.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Working on Lemmix again
« Reply #19 on: January 08, 2014, 11:39:24 AM »
Thanks. I would like to have information on Lemmings 2 (Tribes I hope you mean, because 3D is not Lemmings in my view) because they would be nice to import and play (already trying to create a plugin system for alternative mechanics).

I need to set some expectations here:  don't expect me to ever disassemble any L2 game-mechanics code like I did with L1, at least not anytime in the near future.  Going from 8 to 51 skills, plus the general greater complexity of the programming, and my time availability, means that it's just sort of all very impractical.  The best you can hope for is that people can potentially figure out some of the simpler skills/behaviors (classic 8 skills, platformer, stacker, etc.) through white-box observations+level tinkering alone (helped by the ability to frame-step Lemmings 2 in DOSBox as I explained sometime ago somewhere on the forums).  Anything substantially more complex like any wind or projectile skills, or even something like jumper, is probably not going to happen anytime soon other than rolling your own inexact version.

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #20 on: January 08, 2014, 11:50:13 AM »
I am not expecting L2 game mechanics. I am thinking about a plugin-system for alternative mechanics: something like procedures Game.Tick and Lemming.HandleTick and Lemming.ScanWorld during which the complete state of the game, map, lemmings and objects is can be retrieved and modified.
Not yet decided on the system. Tfere are so much options: DLL, delphi package, LUA to name a few. DLL seems the most flexible, although we have to stick with native datatypes then.

But let me first try importing, showing, editing this L2 stuff :)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Working on Lemmix again
« Reply #21 on: January 08, 2014, 07:14:47 PM »
Hmm, what's LUA?

Also, can you remind me on how portable or not portable Delphi is across different platforms (eg. Linux)?  I mention it because AFAIK DLL is Windows-only and would therefore probably be undesirable if portability is an important criteria.

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #22 on: January 08, 2014, 08:27:45 PM »
Well, LUA... I don't know anything about it actually :) But I know World of Warcraft has extensions / plugins written in LUA, which work fine.
But it is a script language I believe, which I hate on principal.

Linux has died - I think - inside the Delphi product (called Kylix).
Platform targets in the newest version (Delphi XE5) are Win32, Win64, OSX and Android, I believe.

Another option could be to program the whole thing in FreePascal, which has more target platforms.

BTW: tips about what the most flexible system would be for a plugin are welcome. There is COM too...
When you program something in C / C++ how platform independent is that?


Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Working on Lemmix again
« Reply #23 on: January 08, 2014, 09:38:35 PM »
I believe with those, it all comes down to what libraries you use.
My Lemmings 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)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Working on Lemmix again
« Reply #24 on: January 08, 2014, 10:24:08 PM »
Well, LUA... I don't know anything about it actually :) But I know World of Warcraft has extensions / plugins written in LUA, which work fine.
But it is a script language I believe, which I hate on principal.

Interesting, but considering that much of the web now is built on technologies like Javascript and Flash (which uses ActionScript which is a derivative of JavaScript IIRC), I don't think scripting languages are something to be dismissed outright.

Fortunately in principle, you really only need to support one plugin system written with a general-purpose programming language, because the plugin can itself support the ability to host and run other plugins that are written in other languages.  For example, imagine that your plugin system supports DLLs.  I can then (hypothetically) write a plugin DLL that actually is a LUA interpreter, and can therefore be set up to actually carry out the game mechanics by running LUA script code.  And then a year later maybe I can add support for other scripting languages in my plugin DLL.

Anyway, with that in mind, perhaps it's sufficient to start with supporting DLL and Delphi packages (I'd start with Delphi packages as presumably it would be easiest for you to test the system with, seeing that you are developing the system itself in Delphi).  Or maybe both--no one says the system has to support only one option.

=====

Platform independence is, to be fair, a tricky matter in general.  Scripting languages do tend to be more platform agnostic in general.  Languages that must be compiled to native code are generally not as platform independent, and even when they are at source-code level, you still have the issue that the resulting binaries are always platform-specific.  Java is the only thing I can think of at the moment, that is not an interpreted scripting language, but also does not compile to native code, and is explicitly designed to be platform independent.  It does require the user to separately install the Java runtime for their given platform though.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Working on Lemmix again
« Reply #25 on: January 08, 2014, 10:26:03 PM »
To clarify, while supporting multiple platforms is a nice-to-have, for me personally I had no issues if your Lemmix only works on Windows. ;P Ultimately it's your choices and decisions.

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #26 on: January 09, 2014, 10:15:46 AM »
Packages in Delphi are very convenient, because they can directly use all stuff of the exe or other packages. But the great drawback is that they only work if the package has been compiled with exactly the same Delphi version. With Embarcadero releasing a new version each year packages seem impossible :)

Offline EricLang

  • Posts: 464
    • View Profile
Re: Working on Lemmix again
« Reply #27 on: January 11, 2014, 03:29:27 PM »
Almost ready with a first Lemmix XL alpha version. I will post a downloadlink here when ready.
Because I have to give a concert next week, there will be some delay. Let's say 2 weeks.
The version will have:
- a lemmings database explorer with which we can view all contents
- a level searcher
- a level editor which will not be able to edit yet :)

So the program is mainly a 'viewer' but I need some feedback as early as possible.
Nice feature is that we can edit multiple levels in seperate tabs.

P.S. a 'sticky' Lemmix thread would be nice for this.