jLevelBuilder 1.88 (june, 9th 2021)

Started by LJLPM, May 27, 2013, 09:41:37 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

LJLPM

There is a bug with moving objects

when moving left or right, it goes farther right than it should or less left I'm not sure but it's not equal. Then, I can't hold down control and  move objects slightly to the right at all. But I can every other direction.
Up and down seems to work fine, both normal and with control held down.
and moving terrain and steel works fine.
No there's no bug http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" />, but I should have explained it somewhere (I really have to write this README!!! http://www.lemmingsforums.com/Smileys/lemmings/cool.gif" alt="8)" title="Cool" class="smiley" />)

According to Lemmings's level-format, Objects' posX must be a multiple of 8:

=> from http://www.camanis.net/lemmings/files/docs/lemmings_lvl_file_format.txt" class="bbc_link" target="_blank">http://www.camanis.net/lemmings/files/docs/lemmings_lvl_file_format.txt
" ==OBJECTS===============================================================
[...] x pos  : [...] note: should be multiples of 8 [...]
"

So, to prevent from having misplaced Objects in a level, the editor auto-sets the nearest allowed posX value (ie: multiple of 8 ). Everything is ok here.

And the same applies for level's start position:
" [...] Start screen xpos : [...] is rounded to nearest multiple of 8 [...]"


-This is important: when cloning (or copying) things, the original thing should be deselected. As it is, you always have to unselect everything manual so you can move the copied thing without moving the original thing. If there is a good reason for having it the way it currently is that's fine, but an off/on option would be nice.
I like to create an item, clone it, and then move the original item + its clones to the place I want them to be.
But I will add the "on/off" option you asked for: no problem http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" />
Until I add this option, just "click + ALT" on the item you want to deselect (no need to deselect all)
=> ALT = deselect clicked item


The shift V function is very nice, very versatile.
Yes, I agree http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" />

It will just take some while getting used to  http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" /> You might want to explain this one in a little more detail somewhere. (maybe you already did and I didn't see)
No, you're right, I didn't talk too much about this feature.
Everything is here:
http://www.lemmingsforums.com/index.php?topic=794.msg17285#msg17285" class="bbc_link" target="_blank">http://www.lemmingsforums.com/index.php?topic=794.msg17285#msg17285
Basically, the "Collision Mask" feature restrains items' moves between horizontal/vertical borders: it's convenient for making quick item-alignments. Since it also displays x/y positions and the spacing between the borders, it may also be used as a ruler.

By the way, just press 'v' (Visibility mask) to mask everything which is out of game's screen-dimension (may be useful, when you set your level's start-position and you want to know what the player will see when the game starts!!! http://www.lemmingsforums.com/Smileys/lemmings/cool.gif" alt="8)" title="Cool" class="smiley" />)

Having the zoom ability in normal screen mode would really be nice. It seems very restrictive as it is now.
Didn't check this atm, but, personally, I like to have my Zoom window always opened over the lower-left part of the GUI. I didn't find it restrictive: it's always here and available!
I'll check what I can do for this, but because of the way it was originally designed, I can't promess you I'll change this (it's not an easy thing to re-work/re-design...  http://www.lemmingsforums.com/Smileys/lemmings/cry.gif" alt=":'(" title="Cry" class="smiley" /> ).

I was making a level and accidentally deleted the whole thing by pressing F4. Perhaps you should add some kind of tool tips feature or an optional warning message for this sort of thing. Or just make it so you can't load a save if there is no save yet.
The beta 1.11 is now available, and it makes the QuickLoad/QuickSave operations safer (confirmation message + can't load an empty slot: nice additions, thank you for your feedback on that).
Get the .zip as usual, and just replace your current jLevelBuilder.jar with the one in the new .zip (no need to overwrite the other files)

LJLPM

-This is important: when cloning (or copying) things, the original thing should be deselected. As it is, you always have to unselect everything manual so you can move the copied thing without moving the original thing. If there is a good reason for having it the way it currently is that's fine, but an off/on option would be nice.
1) OK. I have added the feature you asked for http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" />
http://imageshack.us/photo/my-images/197/48n1.png/" class="bbc_link" target="_blank">http://img197.imageshack.us/img197/706/48n1.png" alt="" class="bbc_img" />

Of course, you can also trigger "Clone -" (deselect the source entities after cloning) and "Clone +" (select the source entities after cloning) using their respective keyboard shortcut.

2) I've also added a visual feedback to know what are the currently occupied slots (quicksaves/quickloads).
Look at the upper-right corner of the picture below: first line shows the indexes of active "Selection" slots (slots #1, #2 and #4 contain a saved selection), while the second line shows the indexes of the active "Scene/Level" slots (slots #3 and #4 contain a saved level).
http://imageshack.us/photo/my-images/849/2x7r.png/" class="bbc_link" target="_blank">http://img849.imageshack.us/img849/4387/2x7r.png" alt="" class="bbc_img" />

I will release the beta 1.12 tomorrow (I'll post a message when it's done).

PS: please think of "click + ALT" when you need to deselect a specific item, and think of "click + CTRL + ALT" when you want to deselect many entities in a single action (and "CTRL + d" deselects everything)

LJLPM

Having the zoom ability in normal screen mode would really be nice. It seems very restrictive as it is now.
It took me some time but I dit it!
- press "z" to zoom the main window (x1 => x2 => x4 => x8 => x1 => ...).
- press "SHIFT + z" to open a floating zoomed window while the main window stays in 1:1 size.
So both options are available, and everyone should find something that suits her/his needs.

Nevertheless, mouse is not supported in zoomed windows (because of scaling stuff, and I don't want to/won't bother with this...).
And since zoomed windows are best used for accurate moves, then it is perfectly ok to use keyboard's arrows to perform accurate moves (1px).
For selecting items in zoomed windows :
- 1) make your selection in the 1:1 sized view, before zooming
- 2) or use selection-quickloads
- 3) or click on items directly in the "level's items" list (in zoomed view, if you need to know about specific items' insertID, just perform "CTRL+a" then "CTRL+d").

Please report any bug you may find. Thanks.

beta 1.15's new features:
==================
- "clone-" and "clone+" options (deselect the source-item / select the source-item after cloning)
- "paste-" and "paste+" options (deselect the source-item / select the source-item after pasting)
- visual feedback of active quicksave slots (selection slots, and level slots) in level's upper-right corner
- can now zoom the main window

PS: you'll need to overwrite your current "keyconfig.ini" file with the newer one included in this new beta (because of new keyboard shortcuts!), so backup your current "keyconfig.ini" if you want to take a look at it, in order to report your own key-mappings in beta_1.15's keyconfig.ini

http://imageshack.us/photo/my-images/853/8yqp.png/" class="bbc_link" target="_blank">http://img853.imageshack.us/img853/1120/8yqp.png" alt="" class="bbc_img" />

LJLPM

beta 1.16 uploaded.

2 new features:
===========
- when nothing selected, use keyboard's arrows to adjust snapgrid's offsets on X and Y (1px by 1px)
- resize selected "Steel" item(s) by holding mouse's right-button (dimension ranges from 4x4 to 64x64, multiple of 4)
  > can resize many "Steel" items at once: selected Steel with highest insertID must be used as the reference
  > "Steel resizing" process allowed only when Steel items only are selected (can't resize other items)

download link: http://www.lesjeuxlesplusmieux.com/jlevelbuilder.html" class="bbc_link" target="_blank">http://www.lesjeuxlesplusmieux.com/jlevelbuilder.html

mobius

No there's no bug http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" />, but I should have explained it somewhere (I really have to write this README!!! http://www.lemmingsforums.com/Smileys/lemmings/cool.gif" alt="8)" title="Cool" class="smiley" />)
According to Lemmings's level-format, Objects' posX must be a multiple of 8:

oh wow, that's great. Never even thought of that  http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" /> I thought objects must fit on this grid in the y position too? no? Well, in any case a very handy feature, indeed!

I'll get around to making this level once I'm done with the Lemmini community pack I'm working on.
and thanks very much for all the new features you added  http://www.lemmingsforums.com/Smileys/lemmings/thumbsup.gif" alt=":thumbsup:" title="Thumbs Up" class="smiley" />
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


LJLPM

An object's position is only limited on the X axis (multiple of 8 ). On the Y axis, it's free.
And a level's start position has also to be a multiple of 8 on X. And Steel's width & height should be multiples of 4.


EDIT:
next version will include a "Zoom Cancel" feature (instead of having to loop through x2, x4 and X8 zoom modes before going back to the normal view, you'll be able to directly reset the view to its 1:1 size using the "Zoom Cancel" keyboard shortcut).

namida

The coordinates of the trigger area are rounded down to the nearest multiple of 4. This only affects the function though; the object (graphically) can be wherever you want, multiple of 4 or not.
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)

LJLPM

You mean Objects can be located on any X position?

According to http://www.camanis.net/lemmings/files/docs/lemmings_lvl_file_format.txt" class="bbc_link" target="_blank">http://www.camanis.net/lemmings/files/docs/lemmings_lvl_file_format.txt, stored X-position for Objects should be a multiple of 8.
And in Lemmix, if an Object's X position isn't aligned on a multiple of 8, then the "Validate Level" option displays this error: "Object 1: ObjectX is not a multiply of 8" (and all the official levels I have looked at have Objects's X-pos multiple of 8 ).

I'm ok for modifying the code, but I just want to apply a valid fix http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" />
Thanks for your help!

Simon

The trigger area is managed by DOS L1 in squares of 4x4 pixels.

I'm not sure why there should be a more severe restriction for multiples of 8, or whether oddly placed (= not at multiple of 4) special objects work. I vaguely recall that such objects lose their physical effect and behave like decoration. Edit after ccexplore's next post: Behaving like decoration is what objects with too high a z-coordinate do, not what oddly placed objects do.

Others will know better though. :-)

-- Simon

mobius

in Lemmix, the object trigger areas (not the entire object itself as already stated) can only move in those increments in BOTH x an y directions. Idk whether this x or y argument is true or not but that is how Lemmix does it.
-if steel isn't aligned correctly; it gets moved automatically, when playing the level or the next time you open up the saved level. And it may (and often is) be moved in either x and/or Y directions.

I just tested to see a steel piece of 60x60 works so it must not be 8.
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


ccexplore

Summarizing below for tl;dr. http://www.lemmingsforums.com/Smileys/lemmings/winktounge.gif" alt=";P" title="Wink-Tongue" class="smiley" />:

- While it is flagged in the validator, since Lemmix doesn't actually make it compulsory, it's likely there are custom levels out there that already have made used of non-multiples of 8 in interactive object's x, making it somewhat necessary for other editors to support it.  From what I can tell and recall, objects with such x values still work well enough in both Lemmix and even the actual DOS programs (ie. DOS Lemmings, CustLemm, etc.) that chances are good that no one even realizes it's an "issue" for such levels.

- For steel areas, IIRC even the level file format itself cannot represent steel area x and y as anything other than multiples of 4, so there's nothing to fix or debate here.

- Level starting screen x position:  I'm not sure how exactly it will behave in DOS, but I know for sure that the game mechanics governing how lemmings move and interact in the level never uses that value, and I'm guessing Lemmix doesn't behave any differently whether it is multiple of 8 or not.  So like object x, you may have to support it by virtue of existing custom levels out there already having made use of non-kosher values here.

[Aside: as explained below, the multiple-of-8 for object x is really an artifact of how pixels are organized in memory in the display mode used by the DOS game, and it really only comes into play when displaying the object on the screen.  This also means that if you use one of the other graphics-mode variants of Lemmings like CGA/TGA, they may well support slightly different visual display alignments for object x.  (Granted, I have not tested this at all or disassemble the programming in much detail for the CGA/TGA EXEs, so this is just an educated guess.)]

==========

IIRC (could be inaccurate as it's been a while since I actually tested things out or looked at the code), in the actual (DOS) Lemmings game (including varieties such as CustLemm), if you set an interactive object's x position to a non-multiple of 8, the game will still position (visually) the object visually at the highest multiple of 8 not exceeding x (ie. nearest on the left of the true x).  This is really an artifact of how pixels are laid out in memory in the video display mode used by the game.  This is probably why rt documented the x position "must" be a multiple of 8.

But, calculations of trigger areas actually use the true x value but is subjected to the usual snapping to multiples of 4 as mentioned by Simon (ie. applied after adding the object's trigger position offset from groundXo.dat), and trigger area effects should still work.  In that respect it's basically no different than trigger area's y.  Calculations of "entrance locations" (namely, where exactly a lemming is initially placed in the level when it comes out of a particular entrance trapdoor object) uses the true x (and y) value as-is.

AFAIK Lemmix doesn't emulate the part where the visual display position is snapped to multiple of 8.  But I think it handles the rest just like the real game, and since the visual display doesn't affect gameplay (ie. results with respect to Lemmings and moves), levels using non-multiples of 8 for object's x position should still "work" as far as solutions and emulation accuracy go.  Still, given that the objects won't be displayed at the exact correct locations in CustLemm and so forth, it is not a bad idea to avoid using non-multiples of 8 for object x positions to avoid confounding users of CustLemm and similar, just like the official levels avoid.  Lemmix currently flags this as an error if you run object validation, but it is not compulsory and since both the level editor, the level file format and its game emulation all handle it well enough, I'd expect a number of existing custom levels to have made use of non-multiples of 8 for object x as a result.

Steel areas are handled as a different type of element than interactive objects.  IIRC the level file format itself only allows steel areas' x and y positions to be represented in multiples of 4, and inside the game it is handled through the 4x4 pixels square grid that Simon mentioned.  Thus they are effectively "moved" to multiples of 4 as soon as you play or save the level, like Mobius observed.  Ideally Lemmix really should never allow steel areas to be positioned out of the 4x4 grid alignment within the editor.

I don't remember how the starting screen position of the level behaves in the actual DOS game if you don't set it to a multiple of 8.  On the other hand, Lemmix probably (don't remember for sure off top of my head) doesn't enforce any constraints on that value and likely will handle it normally like multiples-of-8 values, so again you may have some custom levels that already have used non-multiples of 8 for starting screen position.

LJLPM

Thank you for your explanations, guys (with a special mention for ccexplore and its very detailed post http://www.lemmingsforums.com/Smileys/lemmings/thumbsup.gif" alt=":thumbsup:" title="Thumbs Up" class="smiley" /> )!

This debate actually made me think of a new feature that I've just finished coding: the "Auto-Snap Settings" window.
From this window, you'll be able to freely set auto-snapping values when moving items on the X and Y axises (using this option, no more on-screen snapgrid required)

You'll be able to set distinct snapping values for items according to their respective type (Terrain, Object, Steel, and Helper).
Plus you can also enable/disable your snapping settings by simply checking/unchecking the relevant checkboxes, near the snapping values.

The trigger area is managed by DOS L1 in squares of 4x4 pixels.
So, guys, if you're ok with that, the next version will set Object's auto-snapping to 4x4 by default (and 4x4 for Steel, too).

The new version isn't available yet: I'll post a message when it's done.

screenshot showing the new "Auto-Snap Settings" window:
http://imageshack.us/photo/my-images/22/8ocg.png/" class="bbc_link" target="_blank">http://img22.imageshack.us/img22/6988/8ocg.png" alt="" class="bbc_img" />

ccexplore

The trigger area is managed by DOS L1 in squares of 4x4 pixels.
So, guys, if you're ok with that, the next version will set Object's auto-snapping to 4x4 by default (and 4x4 for Steel, too).

For objects I'm leaning more against any auto-snapping on y by default (or equivalently, a snap value of 1), although given that auto-snapping can be disabled, maybe it's not a big deal and people can set it to whatever they prefer and save their preferences for all future uses.  As an example, for aesthetic and other various reasons, from time to time you may want to adjust an exit or trap object's y to not align to multiples of 4 despite the trigger area not following along with the adjustment, particularly to get better visual alignment/positioning with the surrounding terrain.  Plus, entrances do not use trigger areas (the "lemmings out" location is calculated by the game rather than based on trigger areas), and given that lemmings fall 3 pixels per frame, it is reasonable to want to adjust entrance y-positioning freely.

That said, one argument for a default object-y snap of 4 is that it might help newbies avoid the problem of their exits and objects not working because the trigger area isn't positioning correctly with the terrain due to the alignment.  On the other hand, the ability to see exactly where the trigger areas are located is a better solution anyway for that problem.

The auto-snapping for object's x, I would actually favor 8 if the default is to auto-snap, given that the multiple-of-8 alignment has the most consistent visual behaviors across various means of playing the level including Lemmix, CustLemm, etc.  But as long as user preferences can be saved for future sessions, I guess the defaults don't matter too much anyway.

LJLPM

Ok, I'll make made these settings editable in the "config.ini" file, so anyone will be able to freely set her/his favorite starting config http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" />. I'll post a message when the new version is available.

mobius

I've begun editing terrain pieces in Lemmini so aligning things will be easier for your editor. I've put up with those stupidly placed boundary boxes for long enough  http://www.lemmingsforums.com/Smileys/lemmings/tongue.gif" alt=":P" title="Tongue" class="smiley" />

If I could code, I would change the the 4x4 object set-up...
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