Author Topic: extracting Cheapo graphics  (Read 37542 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: extracting Cheapo graphics
« Reply #30 on: January 20, 2015, 07:01:44 AM »
Simple is always good. If you could at least document the format, I could look at doing something with it...
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 mobius

  • Posts: 2752
  • relax.
    • View Profile
Re: extracting Cheapo graphics
« Reply #31 on: January 20, 2015, 10:14:06 PM »
 :thumbsup: thanks big time. This is really cool.

Alright! :) I'll have a look at the output from this later on today, and see what I can do about making a tool to convert the output to NeoLemmix / SuperLemmini styles. Of course, keep in mind that objects that don't exist in these versions can't be transferred (which is pretty much any Cheapo-exclusive object, with the exception (only in NeoLemmix) of the teleporters).

I just updated the zip file link so that it extracts music (.midi) and sound (.wav) files.
The only thing left is object info. Is that even useful to know? I'd have to make a list of objects, and write out the position of each sprite that it uses for each frame. Before I make up a format for extracted objects, I'll wait to see if anyone has any requirements. Otherwise I'll just make up an XML or JSON text format.

I'd be interested in objects but not sure about requirements or how high of a priority it is, considering I'm not even sure how to create new objects in Lemmini/SuperLemmini. [what I would be doing this for right now that is]
« Last Edit: January 20, 2015, 10:20:44 PM by möbius »
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 mobius

  • Posts: 2752
  • relax.
    • View Profile
Re: extracting Cheapo graphics
« Reply #32 on: January 21, 2015, 01:33:42 AM »
It works great so far except I get an error when I try to extract the Mario (SMB) set. It says invalid style file. Any ideas [the style works fine in-game...]

This was the one style I really wanted above all the others  :'(
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 Essman

  • Posts: 139
    • View Profile
    • Ferret Face Games
Re: extracting Cheapo graphics
« Reply #33 on: January 21, 2015, 01:43:06 AM »
It works great so far except I get an error when I try to extract the Mario (SMB) set. It says invalid style file. Any ideas [the style works fine in-game...]

This was the one style I really wanted above all the others  :'(

I don't have a copy of that Mario style file. If you get a copy to me then I'll debug the extractor and see what's wrong.

Edit: I think I found the SMB.sty file online so I'll check it out later. Thanks for the info.

Offline Essman

  • Posts: 139
    • View Profile
    • Ferret Face Games
Re: extracting Cheapo graphics
« Reply #34 on: January 21, 2015, 04:33:20 AM »
It works great so far except I get an error when I try to extract the Mario (SMB) set. It says invalid style file. Any ideas [the style works fine in-game...]

This was the one style I really wanted above all the others  :'(

I ran the extractor on smb.sty and it worked fine. I added an attachment of the files that were extracted.
Try downloading the style extractor zip file again, I've been updating it as I make fixes. Or maybe you have a corrupt copy of smb.sty. Either way, hopefully the attached zip file has what you want.

Offline mobius

  • Posts: 2752
  • relax.
    • View Profile
Re: extracting Cheapo graphics
« Reply #35 on: January 21, 2015, 10:09:15 PM »
It works great so far except I get an error when I try to extract the Mario (SMB) set. It says invalid style file. Any ideas [the style works fine in-game...]

This was the one style I really wanted above all the others  :'(

I ran the extractor on smb.sty and it worked fine. I added an attachment of the files that were extracted.
Try downloading the style extractor zip file again, I've been updating it as I make fixes. Or maybe you have a corrupt copy of smb.sty. Either way, hopefully the attached zip file has what you want.

 :thumbsup: exactly what I wanted thanks a million.
So far this is the only time I've had a problem everything else extracted fine.

Do you have documentation or know who created each style?
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 Essman

  • Posts: 139
    • View Profile
    • Ferret Face Games
Re: extracting Cheapo graphics
« Reply #36 on: January 21, 2015, 10:16:15 PM »
Do you have documentation or know who created each style?

Nope, not unless the creator included a readme file with the style. For SMB.sty, the readme says "Insane Steve" created it.

Offline Essman

  • Posts: 139
    • View Profile
    • Ferret Face Games
Re: extracting Cheapo graphics
« Reply #37 on: January 27, 2015, 03:13:05 AM »
One last update for the style extractor: All information about sprites and objects are written to XML files.
https://github.com/spadapet/cheapstyle/blob/master/Publish/CheapStyle.zip?raw=true

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: extracting Cheapo graphics
« Reply #38 on: January 27, 2015, 05:51:24 AM »
Working on a LemSet update that can take these files as input. :)
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 Essman

  • Posts: 139
    • View Profile
    • Ferret Face Games
Re: extracting Cheapo graphics
« Reply #39 on: January 27, 2015, 06:09:57 AM »
Working on a LemSet update that can take these files as input. :)

Cool, if you're using the files, let me know if I can change the file format to make them easier to use.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: extracting Cheapo graphics
« Reply #40 on: January 27, 2015, 06:49:15 AM »
It's manageable as it is. :) I already modified LemSet to accept PNG (and GIF) files before I saw this post, and that's probably the only major obstacle that existed.

However, two pieces of info that could be useful:
- How exactly does Cheapo calculate a circle trigger area? NeoLemmix doesn't support this, so I'd have to approximate it with a square (or add support for it, in which case knowing the algorithm would be useful).
- What sound effects correspond to what traps?
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 Essman

  • Posts: 139
    • View Profile
    • Ferret Face Games
Re: extracting Cheapo graphics
« Reply #41 on: January 27, 2015, 07:22:46 AM »
However, two pieces of info that could be useful:
- How exactly does Cheapo calculate a circle trigger area? NeoLemmix doesn't support this, so I'd have to approximate it with a square (or add support for it, in which case knowing the algorithm would be useful).
- What sound effects correspond to what traps?

I forgot about circle triggers for objects. Now I added support for them, but it's not well tested since I couldn't find any objects that have circle triggers. But I think it works. You would've seen negative rectangle sizes before I added circle support.

I attached a text file here that lists all of the sound effect numbers.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: extracting Cheapo graphics
« Reply #42 on: February 06, 2015, 09:13:33 PM »
Just for record, I haven't forgotten about this. But I am going to have to make some adjustments to NeoLemmix, to support having more than one window in the same graphic set, as even some of the official Cheapo styles use this, let alone fan-made ones.

EDIT: I have support for it implemented in LemSet, and I have it functionally (but not yet graphically) working in NeoLemmix (ie: they function as windows, but don't yet follow the rules for how windows are meant to animate).

EDIT: Fully implemented now.


There are some types of objects in Cheapo that NeoLemmix doesn't support (basically anything that doesn't appear in the official games, except for Teleporters; also NoSplats are virtually the same as NeoLemmix's updrafts so those could be used as a substitute; also it doesn't support triggered harmless animations (only constant ones) or exits, or SingleTele / TwoWayTele). Most likely, I'll just convert the unsupported ones to objects that do nothing.
« Last Edit: February 07, 2015, 12:01:12 AM by namida »
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 namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: extracting Cheapo graphics
« Reply #43 on: February 07, 2015, 02:16:12 AM »
Alright, I just took this for its first test run. Results:

- Terrain is converted PERFECTLY. :)
- Objects, not so well yet. Some types seem to not function even when they should, the spawn point for windows is a bit off fixed and fixed, and most of all, the graphic is entirely missing the graphics are fine now.
- NeoLemmix also seems to have a weird issue when a graphic set has a window as the first object. Fixed this one.
- Objects don't have sound linked to them yet, but after intensively examining the code, I have determined that this is because I haven't written any code to handle doing so yet - important parts first. :P


EDIT: By any chance, does the window spawn position (HitPointX and HitPointY) refer to the lemming's top-left rather than it's foot position? No worries, through trial-and-error I worked out the correct relative position to use.

Also, I notice that the extracted width/height of images are 1 higher than the actual width/height (eg: for a terrain piece that's 32 pixels wide, the width in the XML file will be listed as 33). This applies to both terrain pieces and object frames; not sure about anything else.
« Last Edit: February 07, 2015, 03:24:00 AM by namida »
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 namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: extracting Cheapo graphics
« Reply #44 on: February 07, 2015, 03:43:20 AM »
Things are looking good. There's one small snag of what to do about one-way arrows; as you probably know, Cheapo doesn't consider them "objects", but treats them more like how steel areas are handled (or at least, how they were prior to autosteel's existance). Since the sizing of them is very flexible, unlike in other engines where they're restricted by the size of the object, this could be problematic when converting levels (of course, in all but the very best of cases, Cheapo level conversions are going to require some manual touching-up anyway - NeoLemmix is probably the closest currently-used engine to Cheapo mechanics-wise, but there are still a lot of differences).

But, to show that I'm getting somewhere; here's a saved gameplay image showing a Cheapo graphic set being used in NeoLemmix (note the Swimmer, which is not found in Cheapo).
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)