extracting Cheapo graphics

Started by mobius, December 06, 2014, 09:59:32 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Essman

Quote from: namida on February 07, 2015, 02:16:12 AM
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.

Oops! I can fix that bug in the style extractor soon, you shouldn't have to deal with that bug. Sorry.

Essman

Quote from: namida on February 07, 2015, 03:43:20 AM
...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).

That is really cool!

By the way, I started on a level/set data extractor program that will act like the style extractor program. It will extract all of the levels into .png files and all of the level data into an .xml file (the data is the release rate, tool count, object placement, etc).

namida

Awesome! Will it also work on compiled sets?
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)

Essman


Essman

Quote from: Essman on February 07, 2015, 06:46:18 AM
Quote from: namida on February 07, 2015, 02:16:12 AM
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.

Oops! I can fix that bug in the style extractor soon, you shouldn't have to deal with that bug. Sorry.

I think I fixed the bug. You can download the style extractor again and the sprite sizes should be correct.

Wafflem

Quote from: namida on February 07, 2015, 03:43:20 AM
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).

Sorry if this is off-topic but Cheapo-related, but will this become a level for one of your future packs?
YouTube: www.tinyurl.com/YTWafflem
Twitch: www.twitch.tv/Wafflem467

Have level designer's block right now? Have some of my incomplete levels for LOTS of ideas!

namida

Quote from: DynaLem on February 13, 2015, 03:34:40 AM
Quote from: namida on February 07, 2015, 03:43:20 AM
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).

Sorry if this is off-topic but Cheapo-related, but will this become a level for one of your future packs?

Nope, I just made it to test the graphic set's functionality. I would upload the level, except that it relies on a feature which isn't implemented in current versions of NeoLemmix (specifically, having multiple window objects in a single graphic set). Before I release the update with this, I want to make sure everything needed for Cheapo is supported; in turn this will most likely mean it won't happen until after the level extractor is done, and I make a convertor.
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)

namida

#52
To give an update on the one-way arrow situation: I'm still not entirely sure how I'm going to handle it in levels. Functionality-wise, it's as simple as a modification to steel areas to also allow them being set as one-way areas; graphically might be a bit trickier to implement.

However, as far as making them exist in graphic sets go, I've added code which generates them from the images in the Standards.png file. This provides left and right one-way arrows. I'm still working on some code to also create one-way down arrows. (For those who aren't familiar with NeoLemmix, one-way down arrows can't be bashed, but can be dug, or mined in either direction.)

EDIT: One-way downs are now created properly too. One thing I did have to take into account is that a Cheapo graphic set can have a (virtually) unlimited number of object types, whereas NeoLemmix is limited to 32. So, LemSet will only convert the first 32 objects of a graphic set. If there's at least two spaces left, it'll make one-way left and one-way right arrows too; and if there's still one space left, it'll also make one-way down arrows.

EDIT: At a functional level, I have the arbitrary one-ways working. They're currently invisible, though - that's the next thing to work on.
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)

namida

#53
Okay, I'd say NeoLemmix is ready to accept Cheapo input! :D (Of course, not directly; it'll have to be first extracted with Essman's tool then run through a special conversion tool - both of which have yet to be made. Even after this, I suspect many levels will need manual touching up. But, it'll make the process a LOT easier. The point is; the NeoLemmix engine is now in a state of being able to accept converted Cheapo levels as close to their original form as possible.)

One drawback of the arbitrary one-way walls is that using actual objects for them would be almost impossible; rather, it just sets a one-way wall trigger area on the affected pixels, and hard-draws the one-way arrows onto the terrain there (it won't draw them in thin air of course, only on pixels that are actually terrain). The main effect of this is that the one-way walls set this way won't be animated. This won't matter much when using Cheapo styles, as the one way arrows don't animate there anyway; but for this reason I'll recommend continuing to use the objects rather than the arbitrary areas when making new levels.


For the record, it'll be (obviously) just as compatible with custom Cheapo styles as official ones, as long as they don't use any of the following types of objects:
- Triggered exits (these will work, but won't have the one-lemming-at-a-time effect)
- Two-way teleporters
- Single-object teleporters (teleporter and receiver in one)
- Splat pad
- Gravity changers

Additionally, levels with upside down entrances won't work properly (as NeoLemmix doesn't support inverted gravity).

Teleporters, Receivers and Anti-Splat Pads are fine; NeoLemmix supports the first two properly, and Updrafts are similar enough to the last one to replace them for most purposes.
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)

Essman

Quote from: namida on February 13, 2015, 06:55:13 AM
Okay, I'd say NeoLemmix is ready to accept Cheapo input! :D (Of course, not directly; it'll have to be first extracted with Essman's tool then run through a special conversion tool - both of which have yet to be made. Even after this, I suspect many levels will need manual touching up. But, it'll make the process a LOT easier. The point is; the NeoLemmix engine is now in a state of being able to accept converted Cheapo levels as close to their original form as possible.)

I'm almost done with my level & set extractor. It works just like the style extractor.
Here is the latest version that just extracts level maps, not objects or other stats yet:

https://github.com/spadapet/cheaplevel/blob/master/Publish/CheapLevel.zip?raw=true
(the latest version will always be at that link)

And also, the source code is on github for anyone that cares:
https://github.com/spadapet/cheaplevel

Essman

Quote from: Essman on February 13, 2015, 07:47:46 PM
I'm almost done with my level & set extractor. It works just like the style extractor.
Here is the latest version that just extracts level maps, not objects or other stats yet:

https://github.com/spadapet/cheaplevel/blob/master/Publish/CheapLevel.zip?raw=true
(the latest version will always be at that link)

And also, the source code is on github for anyone that cares:
https://github.com/spadapet/cheaplevel

OK I'm done with the set/level extractor now (download from the previous link above).
It extracts all of the level graphics into .png files and the level and set info into .xml files. The level info includes all of the object and box locations. The set info is just the name and list of levels.

This is all done through UI, but if anybody needs a different way to extract the info (like command line or .NET API), I can help.

namida

#56
I'll take a look at this when I get home and let you know if there's any changes that'd help, though it should be fine (unless its bugfixes that are needed).

EDIT: Checking it out now.

EDIT: (Still assuming a lack of any needed bugfixes), I'd say this will be more than adequate. :)

I'll probably do a test run of converting a few levels, then release a player with those and give people a chance to test it out and see if any issues stand out. If you don't mind, I'd like to use your converted levels from your first clone for this purpose - it gives a good number of levels that are fairly standard (before worrying about more advanced things).

One thing that would help, though I can live without if need be (and this might have to be the case depending on the level format) - is there any chance that the level XML files could contain info on what *type* of object each object is? If this can't be done, I can always get around this by asking for a copy of the style to also be present in the folder when running a conversion, and checking the object indexes against that. It's just that this may be nessecary to get proper functioning of certain objects, in particular windows and teleporters.

EDIT: One minor detail - is it possible to have an option to *not* open the folder after extracting, and perhaps also to not auto-close the app? This would be useful when wanting to extract multiple styles / level sets at a time.
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)

namida

Okay, I found one bug so far just by looking through extracted XML files - it doesn't seem to extract the starting Y position properly; instead it sets it to the same as the starting X position.
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)

Essman

Quote from: namida on February 17, 2015, 04:42:06 AM
Okay, I found one bug so far just by looking through extracted XML files - it doesn't seem to extract the starting Y position properly; instead it sets it to the same as the starting X position.

Poop. I'll fix that....

Ok I fixed it.

Yes you can use my original levels as test levels, that would be cool and I'd like to play them again someday with a clone that actually works.

As for not showing UI, I made a solution for that:
With the level extractor program, use the command line to pass in two parameters: The level/set file and the output directory. If they are both set, then no UI will be shown.
The level/set extractor download has been updated, but I didn't do the command line option for the style extractor yet (that'll be tomorrow at the latest).

Thanks

Essman

Quote from: namida on February 17, 2015, 03:26:59 AM
One thing that would help, though I can live without if need be (and this might have to be the case depending on the level format) - is there any chance that the level XML files could contain info on what *type* of object each object is? If this can't be done, I can always get around this by asking for a copy of the style to also be present in the folder when running a conversion, and checking the object indexes against that. It's just that this may be nessecary to get proper functioning of certain objects, in particular windows and teleporters.

Yes I can do that by loading the styles along with the levels to know about all the object types. I'll try to get to that in the upcoming days.

Thanks for trying this out.