Author Topic: jLevelBuilder 1.88 (june, 9th 2021)  (Read 100153 times)

0 Members and 2 Guests are viewing this topic.

Offline Tsyu

  • Posts: 350
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #60 on: July 07, 2013, 06:26:02 AM »
I've been working on Lemmini for some time (before you posted this thread), fixing a bunch of bugs and adding some nice features. Among those are additions to the level format. My version of Lemmini isn't actually far from being ready for release. If you want to know what those additions are, let me know and I will post them here.

Offline LJLPM

  • Posts: 402
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #61 on: July 07, 2013, 08:05:01 PM »
Yes, feel free to submit your additions to Lemmini: maybe I could handle these new features in the level editor.

By the way, today, I've added the "Paste" feature ("CTRL-v" keyboard shortcut):
- 1) select one or many entities in the level
- 2) (optional) adjust snap settings on the X axis
- 3) press "CTRL-v" to paste one copy of each selected entity
For example, in the screenshot below, I created a 24-item-based object (the very left one), and pasted it twice: very cool :) This new feature is dedicated to quickly make horizontal clones (GUI's "Clone" option is a little bit more powerful since you can also specify a vertical offset, but using "CTRL-v" for instantly making horizontal clones is convenient)
 


Offline Tsyu

  • Posts: 350
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #62 on: July 07, 2013, 11:12:27 PM »
All right, then. First, though, I'd like to list a few Lemmini level parameters that you might have missed since most or all of the extracted levels lack them:
  • timeLimitSeconds: Sets the level's time limit in seconds instead of minutes. This should not be used together with timeLimit.
  • maxFallDistance: Sets the maximum distance in pixels that a lemming can safely fall. This overrides the setting in levelpack.ini. Default is 126.
  • superlemming: Speeds up everything (including the timer) by a factor of 3, sort of like a forced fast-forward. (My version of Lemmini will mimic the Amiga version and not speed up the timer.)

And now, the new parameters. Those beginning with an asterisk can also be set in levelpack.ini (but only in my version).
  • xPosCenter: Sets the initial screen position using the screen's center rather than the left edge. Not to be used in conjunction with xPos.
  • *maxReleaseRate: Sets the maximum release rate. Default is 99; maximum is 106.
  • *fakeObjectCutoff: My version of Lemmini will, by default, mimic the original Lemmings behavior of allowing only objects with an index below 16 (zero-based) to have trigger areas. This parameter allows for changing that cutoff. Setting this to a negative number disables this "feature," allowing all objects to have trigger areas.
  • *fixSteel: My version of Lemmini will mimic the quirky steel mechanics of the original Lemmings that allows lemmings to dig through steel in certain cases. Setting this parameter to true should make steel truly indestructible, similar to Lemmings 2 and the existing version of Lemmini.
  • *classicSteel: When enabled, the quirky steel mechanics of the original game will be used.
  • *width: Sets the width of the level. Default is 3200.
  • specialStyle: Enables the specified special style, which consists of a single, large graphic. This mimics the way the original Lemmings handled levels like "A Beast of a level" (Fun 22) and "What an AWESOME level" (Taxing 15). The special graphic is treated as the first terrain piece, with all standard terrain pieces rendered in front of or behind it. The actual position of the graphic is specified in a separate INI file in the special style's folder.

My version of Lemmini will support proper backgrounds. For now, backgrounds are limited to a single layer and must use terrain pieces; support for animated objects in backgrounds may come later. Here are the parameters, which are to be placed in the level file:
  • bgSize: Sets the size of the background tile using two integer values. There is no artificial limit to the tile size.
  • bgScrollSpeed: Sets the scrolling speed of the background in relation to the main level. Takes one floating-point value.
  • bgTerrain_x: Selects a terrain piece for the background tile and sets its position and various other properties. The format is identical to terrain_x.

My version of Lemmini will also make a few other minor changes:
  • xPos: Instead of actually using the left edge of the screen, my version of Lemmini will add 320 400 to this value and position the center of the screen to that location, similar to what Windows Lemmings does.
  • object_x/terrain_x: Negative numbers will be allowed in the ID field. A negative number will indicate a blank entry.
  • object_x: You will be able to make any object (including entrances) fake by adding 2 to the last field (the one normally used for making an object upside-down).
Furthermore, levels (and all other INI files) will be parsed in UTF-8 encoding. This will allow strings to contain any Unicode character without changing the way that ASCII characters are encoded. (Yes, you'll be able to change what characters are contained in the font files!)

Offline Tsyu

  • Posts: 350
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #63 on: July 08, 2013, 01:51:09 AM »
<<if you’d like to make your own thread for this I’ll move this post there>>
Yeah, if we're going do discuss my modified version of Lemmini, a new thread is best. I'll have it posted soon.

Offline mobius

  • Posts: 2747
  • relax.
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #64 on: July 12, 2013, 09:42:45 PM »
here's a new idea I just thought of. (wait... or was this present in Lix? I don't even remember  ??? )

Require a key to be held down when using right mouse button to scroll. Or not have to click at all; when a key is held down, it locks the cursor in place and moving the mouse then scrolls without any other clicks. I’d like to try this out.

----------
how compatible is your program right now? For example, If I were to make a level with it, save it as INI, could I then open the level up in Lemmix and it would work? (at least somewhat. It doesn't have to work perfectly).
Also since I noticed that rock level loaded, does that mean other terrain styles have been added? Or is this just a product of being able to open lvl files?
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 LJLPM

  • Posts: 402
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #65 on: July 13, 2013, 11:20:09 PM »
@Tsyu:
Congrats for your work! There are definitively a lot of things you've improved. I may add some of levels' new parameters. Atm, I'm focused on finishing the first version of the editor.

@möbius:
I'll see what I can do about the auto-scroll feature.

how compatible is your program right now? For example, If I were to make a level with it, save it as INI, could I then open the level up in Lemmix and it would work? (at least somewhat. It doesn't have to work perfectly).
Also since I noticed that rock level loaded, does that mean other terrain styles have been added? Or is this just a product of being able to open lvl files?
The current version of the editor allows to load .lvl, .ini & .xml (level editor's native format) files.
You can also save .ini & .xml files. (I'll handle later the save of .lvl files).
Levels in .ini format work well in Lemmini (didn't try loading a .ini file in Lemmix, but it should be ok: I'll keep you informed on that).
And about the terrain styles, since the editor starts looking good, yes, I've added new tilesets to perform my tests :)

What's new?
- I've started to handle "Steel" items: atm, you can place these items in levels (see the pink area in the screenshot below), but I didn't handle these items in the load & save operations yet. It won't be too much work ; I'll do it soon.

- I've added a new feature: "Mark Selected Item(s) as Favorite".
This feature allows you to add a single entity or a selection of entities in a "Favorite Items" list. As expected, you would use favorites to easily & quickly find and pick the single items or combinations of items you use the most (a fav consists in any combination of Terrains, Objects and Steels (incl. attributes such as Eraser, No Overwrite, ...)).
The difference with the "Group" option is that a Group item is basically a new single Terrain (hence a Group item is 100% diggable whatever it is made of), and .lvl and .ini files don't support Groups: so Group items are not aimed at being used in Lemmings levels (I'll use Groups for my own game), and because of these restrictions, I wanted to add a similar feature which could work with Lemmings levels.
Unlike Groups, a "Favorite" doesn't create a new entity: instead, it consists in a shortcut to recall a structure of entities already in use in the level. Basically, you select the entities to mark as "favorite", you click on the "Favorite" button (or keyboard's "f"), then this new fav is added to your list of favs, and you can re-use this fav any time by simply clicking on it in the "Favorite" list. You can add as many favorites as you want in the "Favorite" list. For example, in the screenshot below, I created the left platform, make a favorite of it (a 42-piece favorite entity), and then use the list of favorites to add a new instance of this platform. Favorites are 100% compatible with Lemmings.
It's pretty much like the "Paste" option (CTRL-v, see my previous post) but with the possibility to store and select items from your own collection of useful stuff.

- And for quick access to the stuff you're looking for, you can now filter the items which are displayed in the list of items.
Filters are the following: Terrain, Object, Steel, All, All but Steel, Group, and... Favorite, of course 8)


Offline LJLPM

  • Posts: 402
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #66 on: July 28, 2013, 12:35:30 PM »
Hi,
I didn't have too much time to spend on the level-editor lately, but here are some news about it:

- several bugs fixed + code optimizations (some things worked, but I wasn't happy with the code, so I've re-written some functions). There is still work left on that.

- levels' size is no longer limited to Lemmings's 3200x320 (you set your level's size in a "config.ini" file / default values are Lemmings's), and it has never been easier to add new (custom) tilesets to the level-editor: so, in other words, the level-editor can now be used to design levels for a wider range of games.

- the GUI auto-switches to a vertical layout if you're making a vertical level

- new keyboard shortcuts added (toggle minimap on/off, for example)

- snap grid's lines are no longer displayed in the minimap


Offline LJLPM

  • Posts: 402
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #67 on: July 30, 2013, 08:02:55 PM »
I've just added a new feature that will help to accurately design the levels you imagine: the "Path Mode" feature.

In this new mode,
- 1) you select a single entity or a Favorite made of several entities to be cloned/generated along a path (in the screenshot below, I selected a multi-entity favorite => it's the red-selected item in the item list, and on the level's left side, you can see this favorite is not a single object but it's actually made of some various items)

- 2) then, you continuously draw each segment of your path until you decide to stop your path. And for each single segment, you set in real time the number of clones you want along the current segment (using keyboard's arrows to adjust the number of clones).
During this process, you see in real time the location of each item/clone on the segment: so, as you stretch and move path's current segment, you have an instant visual feedback of how your items will be finally set in the level. This is very coooooool to accurately design level's areas!
And until you commit the path's current segment, the clones that are displayed on screen act only as visual references (therefore, you don't see them in the minimap, since I didn't commit the path yet). When you commit the segment, items are actually added to the level.

Paths can be snapped on the grid lines too 8)

See this screenshot:
- 1 single segment,
- 3 clones wanted in the 1st screen,
- then, 14 clones wanted in the 2nd screen (very same segment)
- and, finally, 12 clones on a shorten straight horizontal line, in the 3rd screen
=> real-time visual feedback of what one is about to draw in the level :)



And the "Path" feature isn't limited to straight lines: you can also perform freehand drawings. Moreover, when you use curved paths, you can specify in real-time the spacing between each drawn item, and, as with straight-line paths seen above, you have a real-time visual feedback of what you're doing: veeeeeeeeery handy to design cool things!

So, with this new tool, generating landscapes is a very easy -and almost instant- job! It's really cool :)

Please, see the screenshot below:
- same path used on each screen (blue hand-drawn curve),
- selected entity used for the path is a Favorite made of 4 items
- spacings used are 1) 6-unit spacing (continuous landscape), 2) then 17-unit spacing, 3) then 45-unit spacing, 4) and finally I commited my path using a 99-unit spacing which results in a landscape made of individual islands.


Offline LJLPM

  • Posts: 402
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #68 on: August 16, 2013, 12:30:46 PM »
the dev' is almost over, and I have updated the page where you'll be able to download the level-editor:
http://www.lesjeuxlesplusmieux.com/leveleditor.html

On this page, you can see all the current working features: there are a lot of them now :)
Expect a release in September.

PS: feel free to try my puzzle-game on my website, too

Offline LJLPM

  • Posts: 402
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #69 on: August 25, 2013, 05:21:21 PM »
Cool things have been done on the level-editor recently :)

- one can load & save Lemmings' .lvl files (as well as Lemmini's .ini files and editor's native .xml files).
- steel/metal pieces are 100% handled now.
- the snapgrid displays units in pixels (on x and y).
- you can filter what kind of items are displayed on screen (ie: all items appear in the 1st screen, whereas the 2nd screen displays Terrains only: no more yellow arrows, see?)
- I've also added the "visibility mask", which turns gray everything which is out of ingame screen's 640px-width limit (very useful when setting your level's starting point, for example). This feature is demonstrated on the 2nd screen.
- etc ...



And you can also use another mask-related feature to make quick and easy object alignments against mask's borders ("Collision Mask" feature).
In the screenshot below, top-left: the initial scene, top-right: I defined my mask, and selected some items, bottom-left: perfect left-alignements, bottom-right: perfect right-alignments.




Offline LJLPM

  • Posts: 402
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #70 on: August 30, 2013, 09:01:32 PM »
Ever wanted to design harmonious levels in Lemmings?
Well, just review your maths because you'll soon be able! :)

This morning a new idea hit me for making the level editor even better: add a feature that can evaluate math functions in order to set items' x and y coords!

Well, it's done, it works pretty well, and it's pretty fun to experiment with this feature  :thumbsup:
You can use functions like Plus, Minus, Multiply, Divide, Cos, Sin, Log, Pow, etc ... and numbers like PI. I have also added the possibility to use incremental variables when dealing with multiple items.

Being able to use maths opens a whole new world of level design for Lemmings (I think it has never been done before). What would be a nightmare to do manually only takes seconds now: it's really cool!!!

For example, in the 1st screenshot below, I started with bubbles aligned on a straight line, and then use the "Cos" function to set a nice layout. In the 2nd screen, I used a "Log" function to set very smooth steps for the ground.


Offline ccexplore

  • Posts: 5311
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #71 on: August 30, 2013, 11:28:45 PM »
Neat, although might prove tricky to use effectively for your average user whose math may be rusty.  Perhaps having a "draw Bezier curve" feature (similar to how you already have "draw line segment" and "draw freeform curve" features) would give the average user the roughly similar ability to make smooth-looking curves, without having to brush up on their math. ;P

Offline LJLPM

  • Posts: 402
    • View Profile
Re: coding a Lemmings clone + its level-editor
« Reply #72 on: August 31, 2013, 02:45:29 PM »
Yeah, the formula editor is a bit of advanced feature but I'm glad it's here :)
It uses Javascript's functions/syntax, and formulas should result in a single number.
Moreover, I'm, too, interested in having Bezier curves in the level editor. Maybe one day...

For making things easier with the formula editor, I've already pre-entered some common functions (as seen in the screenshot below).

below: Making a random (but coherent) ground in seconds using the formula-editor (0 <= Math.random() < 1)


I have also made the formula editor more powerful than yesterday by enabling the use of items' attributes in formulas: for example, now, you can apply changes every n items, or on Terrains/Object/Steel only, or on items with specific width/height or position, etc... (ie: in the following screenshot, I skip 4 items before applying changes on item's position using an incremental variable on Y).


Offline LJLPM

  • Posts: 402
    • View Profile
Re: coding a level-editor for Lemmings
« Reply #73 on: September 13, 2013, 08:38:23 PM »
Hi,
I keep on working hard on the level-editor in order to make it the best Lemmings level-editor ever! With this dev, I really went further than what I initially thought when I started this topic at the end of May. Actually, I think I wouldn't have gone this far without your help & support, so thank you! I'm really pleased with the result, and I hope you'll like it too!(please be patient, I hope to release the editor this month)

In the screenshot below, you can see this week's new features (handy features!):

- 1) a resizable Zoom window (x2, x4, and x8!) to help making hyper-accurate moves and item-alignments (you'll really be able to place your items exactly where you want them to be, at a pixel-perfect level, so no more excuses for approximate item-locations :))

- 2) I also added something I had in mind for weeks now, something very convenient to make level creations easier and faster than ever: just below the level (and just above the Zoom window, in the screenshot), you'll find the complete list of items' thumbnails of a given type (Terrain, Object, ...: depending on the item's type currently selected in the GUI). With this convenient list, you no longer have to scroll though a short list of items to find the item you want to add, because, now, you have instant access to the whole set of items! And the items you'll mark as "Favorites" will always appear at the begining of the thumbnail list (see the level's 2-item-made exit at the very 1st place of the thumbnail list of Terrains? It's a Favorite. You can spot them easily in the thumbnail list because Favorites are displayed over a blue background ;)): very helpful! ...Oh, and you can sort this list by item's ID, width or height ;)

With all the features you'll find in this level-editor, making a level for Lemmings has never been easier or faster! I really can't wait to see the levels you'll design with it!


Offline LJLPM

  • Posts: 402
    • View Profile
Re: coding a level-editor for Lemmings
« Reply #74 on: September 15, 2013, 05:47:04 PM »
I really wanted this editor to be usable by the maximum number of people, so I had to work on the GUI's size, and I've just finished working on the ability to resize the GUI (and that was quite a work, actually :)).
Now the level editor could virtually work on any size of monitors: so whatever size is your computer's screen, you will be able to fully use the level editor :) The config file is initially set with relevant data to launch the editor using large width & height. But you can freely edit the config file to set a smaller (or bigger!) size for the GUI, depending on your needs.
You can also arrange GUI's layout as seen on the screenshots below. And actual level's size is also configurable (in order to make levels for other games than Lemmings).
And, finally, for those who mainly work with keyboard's shortcuts (which are now freely mappable, by the way  8)) and want to work with a lightweight GUI, then, you'll also be able to mask the bottom part of the editor (of course you can easily make it re-appear by a simple hit on the same key that made it disappear): this is a nice addition.

- arranged layout, with edition tools next to the level:


- standard layout for small screens (yes, yes, this is the full view of the editor! Notice the appearance of an horizontal scrollbar at the very bottom of the GUI, to access all the available edition tools/features):


- standard layout for big screens (all the available tools/features of the GUI are visible on screen)


- standard layout for big screens, lightweight GUI (bottom part masked, so you'd better have to know your keyboard shortcuts :)):


By the way:
Everything should be freely mappable to user-definable hotkeys.
done.

how compatible is your program right now? For example, If I were to make a level with it, save it as INI, could I then open the level up in Lemmix and it would work?
Yes, it works :)