SuperLemmini 0.104a

Started by Tsyu, May 25, 2014, 06:20:08 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

namida

I'll hopefully have these features in the editor later today.
Is there any limits on the entrance order thing? eg. max number of entrances, can the same entrance be repeated (eg. 1, 2, 3, 2, 3, repeat), anything else I should know for it?
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)

Tsyu

There are no limits on the entrance order--entrances can be repeated in the list (so things like "2, 1, 3, 3, 0, 1" are allowed), and there is no practical limit to the size of the list. If invalid indexes are in the list, then they're skipped as though they weren't even there (meaning that if there are three entrances and the list is "1, 3, 2, 0", then the list becomes "1, 2, 0"). The only other thing to keep in mind is that only non-fake entrances count, so if there are three entrances and the second one is fake, then the third entrance has an index of 1 rather than 2.

namida

Also, just to be clear - is minimum height 320?

I might actually be a bit longer on this one - the entrance order will be a bit tricky to implement, while I'm going to add adjustable dimensions to NeoLemmix as well so may as well support both at the same time rather than have to come back and add in the same function under NeoLemmix style later. I might consider the entrance order thing too - it should actually be quite simple to implement on the player side as it already saves an entrance order internally (it's just automatically generated based on their indexes).
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)

Tsyu

Also, just to be clear - is minimum height 320?
Not really, but it's the recommended minimum because if the height is less than 320, then there will be a gap between the bottom of the level and the status area, and the minimap frame won't be properly adjusted to fit the level. I'll probably fix the former in a future version, but I'm not as sure about the latter.

namida

Another thing: Have you not yet added an option to set the screen start Y position, or have you just not documented it?
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)

Tsyu

Oh yeah, sorry about that. Yes, I did implement a way to set the start Y position: yPosCenter, which works similarly to xPosCenter. (There is no yPos, by the way.) I will reupload SuperLemmini 0.95 in a few minutes with this parameter documented. Anyone who has already downloaded it will not need to download it again.

namida

Okay - I've got adjustable height and yPosCenter both working perfectly fine in the editor. Still got to do something about the window order; first I need to decide *how* I'm going to implement it.
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)

uci

Good news: I think I fixed the problem that you're having. My sound code had each line call http://docs.oracle.com/javase/7/docs/api/javax/sound/sampled/DataLine.html#start()" class="bbc_link" target="_blank">start() when it started playing a sound and http://docs.oracle.com/javase/7/docs/api/javax/sound/sampled/DataLine.html#stop()" class="bbc_link" target="_blank">stop() when it was finished. This works fine on my main computer (which runs Windows 7), but it looks like it doesn't work so well under Windows XP. I changed this so that the lines keep running even when they aren't playing anything; this appears to have fixed the problem on my XP machine.
Maybe a http://docs.oracle.com/javase/7/docs/api/javax/sound/sampled/DataLine.html#flush%28%29" class="bbc_link" target="_blank">flush() is needed? I am just guessing... http://www.lemmingsforums.com/Smileys/lemmings/tongue.gif" alt=":P" title="Tongue" class="smiley" />

Anyway, it seems to work well! Thank you for the effort!

Tsyu

Maybe a http://docs.oracle.com/javase/7/docs/api/javax/sound/sampled/DataLine.html#flush%28%29" class="bbc_link" target="_blank">flush() is needed? I am just guessing... http://www.lemmingsforums.com/Smileys/lemmings/tongue.gif" alt=":P" title="Tongue" class="smiley" />
No, that discards whatever is in the buffer, which would cause the sound to cut off early. A more appropriate method, and the one that I was using, is http://docs.oracle.com/javase/7/docs/api/javax/sound/sampled/DataLine.html#drain%28%29" class="bbc_link" target="_blank">drain(), which blocks until the sound buffer has finished playing. At least, that's what's supposed to happen...

namida

New NeoLemmix Editor update is here. It can edit SuperLemmini levels with non-standard vertical sizes (including changing the size) and set the screen start Y position. In the end I didn't get around to implementing the editing of entrance order; but it does *preserve* custom entrance orders when loading a level with one.

https://www.dropbox.com/s/wwu3xh8sogro3ed/NeoLemmixEditor_V1.23n-A.zip" class="bbc_link" target="_blank">https://www.dropbox.com/s/wwu3xh8sogro3ed/NeoLemmixEditor_V1.23n-A.zip


(Just a thought - it might be worth including a link to the NeoLemmix topic, or at least a mention of "the NeoLemmix editor can edit Superlemmini levels" in the first post? Since at the moment you have no mention of how levels can actually be edited while using SuperLemmini features.)
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)

Tsyu

For version 0.96, I intend to redo the code for the main window so that I can make it resizable and maybe implement full-screen mode. In the meantime, here's SuperLemmini 0.95a, which fixes a few bugs in 0.95:
  • Height and starting Y position are now read from LVL files.
  • Fixed a bug where the size of each background tile was capped at the size of the actual level.
  • Fixed the scrolling behavior of the arrow keys when advanced select is disabled.
  • Possibly fixed a bug where the records of one rating would sometimes instead be applied to a different rating, either of the same level pack or a different one.
  • Reverted my Alt-F4 fix since it caused F10 to select the menu bar, at least under Windows.
  • Tweaked the sound code somewhat, mostly to allow sounds to cut playback of other sounds if no free channels are available.

While I work on 0.96, I will keep two versions of the SuperLemmini project on my computer so that if any major bugs are found, they can be fixed before 0.96 is released.

Tsyu

Version 0.96 is out. While I did make the game window resizable, I didn't implement full-screen mode; quite a bit more work is needed for that to be possible, including changing the use of external dialog boxes to internal ones somehow.

Anyway, here are the changes:
  • Implemented the classic cursor from Lemmini 0.86, which changes the cursor to the box graphic when it's hovering over a lemming (just like what the original games did) rather than drawing both graphics at once. This feature is disabled by default and can be enabled in the new options dialog.
  • The game window can now be resized and maximized.
  • Zoom options have been removed; scaling is now done automatically based on the window dimensions.
  • Certain dialogs can now be resized.
  • Changed the disclaimer and extraction dialogs to frames so that they appear on the taskbar.
  • The title screen now has text buttons for various functions and dialogs.
  • Added "Start Level" and "Menu" buttons to the briefing screen. To start the level, you now need to click "Start Level"; simply clicking anywhere won't work.
  • Added an options dialog and moved all options (including those related to sound) from the menu bar to that dialog.
  • Removed the player-selection menu from the menu bar. Players can still be changed using the Manage Players dialog as before.
  • The mouse scroll wheel now cycles through the available skills.
  • If a level is wider that 3,200 pixels, the minimap no longer expands to display the full level width; instead, the minimap displays only 3,200 horizontal pixels at a time and scrolls as needed.
  • Switched from Timer to ScheduledExecutorService to prevent the game from hanging if the system clock is adjusted.
  • Fixed a bug that caused sound effects (but not music) to no longer play if the sound mixer was changed.

I noticed that my XP machine also experiences the problem where certain colors of flipped objects are changed, so at least I can try to fix that in a future release.

namida

It appears SuperLemmini crashes on a level where the level name is blank. This may be an annoyance to people who repeatedly test levels during development, prior to giving them a name (myself included, though obviously I'm not generally designing for SuperLemmini apart from for the purpose of testing NeoLemmix Editor's support for it). Obviously I could make the editor simply replace a blank title with a single space or some similar workaround, but is there any "official" method to avoid this crash (or is it a bug that needs to be fixed on your side)?
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)

Tsyu

It's probably caused by a blank entranceOrder entry, not an empty name. Does removing entranceOrder from the level file prevent the crash?

namida

It's probably caused by a blank entranceOrder entry, not an empty name. Does removing entranceOrder from the level file prevent the crash?

Confirmed that this happens regardless of entranceOrder setting - it still happens (if the name is blank) with both:
a) no entranceOrder entry at all
b) a perfectly valid entranceOrder entry

I have not tested if it happens with LVL format levels, only INI. I would assume it wouldn't with the former, since a "blank" level name there is actually 32 spaces.
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)