jLevelBuilder 1.88 (june, 9th 2021)

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LJLPM

*** jLevelBuilder has been released on October, 5th, 2013 ***
*** direct download link: here ***

*** for help, please refer to this post ***


Hi,

I've started to code a Lemmings clone in Java: dev is far from being finished (I code the game in my spare time), but things are going well.
But, in order to have a nice game, I quickly realized that I needed a tool to easily create levels: so I'm now focused on coding the level-editor (Java) : things are going well, too.
The level-editor will be a free app, so people who like the game will be able to create and share levels.

Here's a screenshot of the level-editor (WIP):
(selected items have a yellow border)


- screenshot of upcoming jLevelBuilder 1.79 (WIP@april 2016) :


(*** old forum's topic ***)

Mindless

Neat.  Will it load http://lemmini.de/" class="bbc_link" target="_blank">Lemmini level files?  Lemmini is Java too, but it doesn't have a Java level editor.

mobius

it looks awesome!

aw man, are you open to discussion about it? Because there are a ton of things I'd ask for or recommend be considered. Now, people have a much better idea of what we (avid Lemmings players) like and don't like as far as game mechanics.

didn't read the other post you just made. Yes I get excited...

in any case, I hope this turns out well!  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


Minim

I'd take Mindless and mobius' words as well. I like the interface (I think that's what it's called), with every option appearing on the same program unlike the Lemmix level editor which requires you to press functional keys to make them appear. Also, we've never seen options where you can choose level numbers and passwords; that's certainly a unique feature. Good luck creating your program!
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

Simon

geoo and me discussed this a little in voicechat, here's the essence:
  • We will at the very least passively follow this. :-)
  • Everything should be freely mappable to user-definable hotkeys. The Lix editor allows this, and one grows very accustomed to such things...
  • Everything should also be accessible without hotkeys, to make the interface explorable. This seems to be done well already, as minimac noted.
  • You will probably implement your own custom file format, since you allow to mirror horizontally and seem to detect steel pixel-perfectly by terrain piece numbers, not by independently settable steel areas. An exporting function to the widely used .LVL format would be nice. It doesn't matter if the result needs to be finalized in another editor for steel areas etc. This is of lower priority now, but will get important once people have mastered the editor.
-- Simon

LJLPM

Thank you for your feedback!
My goal is not to re-code Lemmings but a game like Lemmings with extra features I have in mind.

- "Will it load Lemmini level files?":
probably not (but I still have to see what Lemmini level files look like...)

- "Everything should be freely mappable to user-definable hotkeys":
I didn't think about that, but that would be handy, yes

- "You will probably implement your own custom file format":
yes

- "An exporting function to the widely used .LVL format would be nice.":
sorry, but I do not target Lemmings/Lemmini as compatible games with the level editor (things may change, but atm I'm only focused on making the level-editor compatible with my Lemmings-like game)

Today, I added the "Symmetry/Mirror" option which allows to make a 1-click mirror of entities http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" /> (see screenshot below).
http://imageshack.us/photo/my-images/16/leveleditor8.png/" class="bbc_link" target="_blank">http://img16.imageshack.us/img16/4482/leveleditor8.png" alt="" class="bbc_img" />

PS1: for convenience, I flag here this interesting topic: http://www.lemmingsforums.com/index.php?topic=695.0
PS2: you can play online my previous puzzle-game here: http://www.lesjeuxlesplusmieux.com/powablox.html" class="bbc_link" target="_blank">http://www.lesjeuxlesplusmieux.com/powablox.html . Hope you'll like it. http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" /> (the best score is very, very, very hard to beat!)

mobius

The mirror options sounds really nice!

These are some game mechanics that I personally prefer, as well as things to look out for when programming the game; (Probably some people will disagree with me on some of these)

-when selecting lemmings have worker/walker/left right priority options
-when selecting certain lemmings; example: when trying to make a lemming a climber, have priority on non-climbers. I say this because in Lemmini and sometimes other programs as well it seems difficult to select the lemming I want, that is; it keeps highlighting the lemming that's already a climber.
-Bashers and miners don't turn around when they hit steel.
-if a lemming is standing partly on air, (like a digger on the edge) he can't be made a blocker and thus fall.

I'd recommend you go over these big glitch lists just to familiarize yourself with the sort of thing that's happened in Lemming games past and to look out for. A lot of these things come about as natural consequences of the game mechanics. But you probably already knew this.

http://www.lemmingsforums.com/index.php?topic=525.0

http://www.lemmingsforums.com/index.php?topic=693.0

-------------
some other suggestions:
-highlighted Lemmings turn a different color when the cursor goes over them. This makes it much easier to see exactly which lemming is being selected.

-the option to select a lemming first then click a skill to assign it instantly (the reverse of the normal behavior), like in Clones. Though I'd definitely want this as an option and not mandatory. Having both of these modes would, I think, be an awesome advantage to the game. Clones being only the one way makes it really jarring to play for the first time.

-another thing I just thought of: consider having numbers like the timer turn color when it's getting close to zero or making noises even. This would be especially helpful on multi-player games (even if your not doing anything multi-player) I like lots of funny noises in my games  http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" />

-have all the stats of a level displayed somewhere while the level is playing

-"break apart" this is a radical and highly involved idea I thought of a while ago that entails being able to highlight a group of tightly cramped lemmings and zooming in and having them separate out temporarily, making it easy to select a specific lemming. This is probably my least useful idea.
---------
as far as new game elements like downward one-way-walls, everything I had is pretty much in that topic. Some I like more than others. Some are taken directly from L2 and Lemmings Revolution.
My favorites are:
level entrances are separate entities.
exits with a max limit of how many Lemmings can go in.
disappearing terrain
pre-placed Lemmings; uncontrollable lemmings
doors and switches
moving traps like weasels
gravity pads

I personally don't care for more than the 8 regular skills.
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

Thank you for your long post! There are nice thoughts, plus I wasn't aware of all the glitches and game mechanics.

- "when selecting lemmings have worker/walker/left right priority options":
what is the highest selection priority actually?

- "Bashers and miners don't turn around when they hit steel.":
they just stop working, and they become simple walkers, don't they?

- I thought, too, about such a "break apart" option, but it probably won't be in the game...

Today, I added the "Move Only On X" and "Move Only On Y" options to the level-editor. They are pretty useful to constraint entities' moves http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" />
http://imageshack.us/photo/my-images/12/leveleditor9.png/" class="bbc_link" target="_blank">http://img12.imageshack.us/img12/457/leveleditor9.png" alt="" class="bbc_img" />

Minim

- "when selecting lemmings have worker/walker/left right priority options":
what is the highest selection priority actually?
In a crowded area the Lemmini cursor generally points to the 1st lemming out the trapdoor, making him the highest priority.

- "Bashers and miners don't turn around when they hit steel.":
they just stop working, and they become simple walkers, don't they?
Indeed they do, but this time they face the same direction they've walked unlike the DOS mechanics.

- I thought, too, about such a "break apart" option, but it probably won't be in the game...
I have an idea, which basically derives from the PSP version. How about if you highlight a certain lemming with your cursor and then hold the key down. The cursor will follow the lemming without you having to navigate the mouse. Quite clever isn't it? In PSP controls I'm talking about the Square button, but if that can be possible it can be a boon in certain situations.
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

mobius

I have an idea, which basically derives from the PSP version. How about if you highlight a certain lemming with your cursor and then hold the key down. The cursor will follow the lemming without you having to navigate the mouse. Quite clever isn't it? In PSP controls I'm talking about the Square button, but if that can be possible it can be a boon in certain situations.
That's basically how Clones works (except in clones it's the only option which is dumb) But yes, this is very useful. For example if you want to just follow one lemming around for a while and need him to do things quickly.

------------
I see you also have invert left and right; excellent option that is sorely lacking in Lemmix.

I thought of some another common issues;
-when a climber reaches the top of his climb, if he's far enough back; he can build and make a ledge so climbers behind him will fall. I personally actually kind of like this aspect; it seems natural and doesn't readily lead to any major level design problems (...at least not as much as other things). It's a cool trick, but on the other hand it is sort of odd I guess and may not be real easy to figure out for players. this also depends on the builder.

-lemmings falling into the middle of the blocker will walk on. Blockers in DOS are a little too lenient with this and Lemmini is too much the other way imo (it's harder to let lemming get through (plus is uneven right to left))

Another thing, and no idea if this is possible//// but you might want to look at Cheapo Lemmings. The guy who made that managed to make it possible to literally draw on your level like in MS paint and add custom graphics.

If you add the function that Lemmings change color or somehow get highlighted when your cursor is over them this alone will greatly improve the game I think. In Lemmings Revolution it's such a big help and alleviates some of the other negative aspects [like not being able to select walkers, it's surprisingly not a big deal because you can easily see exactly which lemming your selecting.]

I've heard other say that "if we're installing all these super precise functions that will lead level designers to make really annoying levels". Which I must admit is possible but not necessarily the way it is and not a problem for me; I don't intend on designing levels that try to make a brutal use of these abilities (I may have in the past but not anymore). And so what if somebody does? That's their choice and the players choice to or not to play a level.

also if you want, I'm willing to test the program for you when it's ready.  http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" /> (too busy right now)
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


Simon

Cursor following lemming is analogous to highlighting, yes. Lemmings is best played with mouse + keyboard, maybe also with mouse only or touchscreen. Any other input device isn't natural for the game and needs such tweaks to be feasible.

Priority under the cursor isn't simple. However, there are games that calculate sane priorities based on selected skill and lemmings under the cursor. All cases there seem to be managable with normal priority assignment or forced inverting of priority. Even with inverted priority, nonsense assignments aren't considered, like climber to climbables. I don't need highlighting here, but it's a nice extra.

You want the editor to be as precise and flexible as possible. Never dumb down the tools because users might do strange things, you will merely annoy the serious users. :-)

-- Simon

LJLPM

Thank you very much for your comments: it's much appreciated!
By the way, expectations for the game appear to be pretty high: good. It fuels my motivation, and I'll try to do my best. I'll keep you informed when I have news about the game. Please remember it's a project I code during my spare time and I'm a hobbyist, so dev will take some time. For the moment, I'm focused on making a cool level editor, and it is a crucial thing if I want to have a good game.

Back to the priority under the cursor, I'm not sure to fully understand how you want it to be. Could someone give me a clear view of the rules/hierarchy to have during the game, please? (climbers vs walkers vs diggers vs ...). Thank you.

http://www.lemmingsforums.com/index.php?topic=794.msg16767#msg16767">Quote from: möbius on 2013-05-29 17:27:30
Another thing, and no idea if this is possible//// but you might want to look at Cheapo Lemmings. The guy who made that managed to make it possible to literally draw on your level like in MS paint and add custom graphics.
I had a "Load Background Image" option available in the early days of the level-editor, but I removed it because I want:
- level files to be small for easily sharing levels (including extra images makes bigger level files)
- levels share common graphic items (depending on the tileset of course) for the game's visual identity.
By the way, I wasn't aware of Cheapo Lemmings, I'll take a look at it!

Last thing: today, I added a "Lazy/Shuffle" option which takes a range of entities as input and generates X of these entities, and randomly place them around the center of the level (quantity "X" is specified by the user) . It's a fun option to spark the inspiration when starting a new level (and the "Clear & Lazy" option fully clears the level before randomly generating entities => just restart this process again and again until you find something interesting to work with).
For example, the level below was ignited using the "Lazy" option triggered twice (it's not the best level ever for sure, but you got the idea, and I could create this scene very quickly using the "Lazy" and "Clone" options).
http://imageshack.us/photo/my-images/853/leveleditor10c.png/" class="bbc_link" target="_blank">http://img853.imageshack.us/img853/4817/leveleditor10c.png" alt="" class="bbc_img" />



Simon

This is the Lix priority code. You should understand everything from the comments, reading the code itself isn't so necessary here. Otherwise I'll explain it more.

The general idea is: Priority is a value between 2 and 9,998. Workers have raised priority (more than the 3,000 of a walker), and nonsense assignments return 0 or 1. The highest priority (or, if desired, the lowest sane priority > 1) is used later.

Assigning basher to builder has the same priority as assigning basher to digger. Should they really overlap, then the earlier-to-spawn gets priority (see note after the code).

Love the function to create some random terrain. :-)

-- Simon

Code: [Select]
unsigned Lixxie::get_priority(
    LixEn::Ac  new_ac,        // what skill is to be assigned
    int        tribes_active, // ignore this for a singleplayer game
    const bool personal       // consider user settings (queue builders, etc.),
                              // this is true when playing, false during replay
) {
    // returns: 0, if assignment not allowed
    //          1, if assignment not allowed, but cursor shall open nonetheless
    //          2 bis 99.998 if assignment OK. Higher number = higher priority
    //         
    //          priority invert isn't done in this function; if the user
    //          inverts priority via right mouse button, then still ignore
    //          return values of 0 and 1, and treat higher returned priorities
    //          as (10,000 - priority).

    unsigned p = 0; // return value

    // Nothing allowed at all, don't even open the cursor
    if (ac == LixEn::NOTHING || ac_func[ac].leaving) return 0;

    // Permanent skills
    if ((new_ac == LixEn::EXPLODER  && updates_since_bomb > 0)
     || (new_ac == LixEn::EXPLODER2 && updates_since_bomb > 0)
     || (new_ac == LixEn::RUNNER    && runner)
     || (new_ac == LixEn::CLIMBER   && climber)
     || (new_ac == LixEn::FLOATER   && floater) ) return 1;

    // Don't plant blockers close to exits in multiplayer
    if (new_ac == LixEn::BLOCKER && tribes_active > 1
        && (enc_foot & Lookup::bit_goal_prox))
        return 1;

    switch (ac) {
        // Cancelling blockers has very high priority (only via Exploder or
        // Walker assignments)
        case LixEn::BLOCKER:
            if (new_ac == LixEn::WALKER
             || new_ac == LixEn::EXPLODER
             || new_ac == LixEn::EXPLODER2) p = 5000;
            else return 1;
            break;

        // Stunners may be turned in their later frames, but otherwise act just
        // like regular mostly unassignable-to acitivities (case falls through)
        // Ascender will do the same on its last frame
        case LixEn::STUNNER:
            if (get_frame() >= 16) {
                p = 3000;
                break;
            }
            // falls through if frame is less
        case LixEn::ASCENDER:
            if (get_ac() == LixEn::ASCENDER && get_frame() >= 5) {
                p = 3000;
                break;
            }
            // falls through if frame is less

        // Other activities that require full attention from the lix,
        // most skills cannot be assigned except permanents (climber etc.)
        case LixEn::FALLER:
        case LixEn::TUMBLER:
        case LixEn::CLIMBER:
        case LixEn::FLOATER:
        case LixEn::JUMPER:
            if (new_ac == LixEn::RUNNER
             || new_ac == LixEn::CLIMBER
             || new_ac == LixEn::FLOATER
             || new_ac == LixEn::EXPLODER
             || new_ac == LixEn::EXPLODER2) p = 2000;
            else return 1;
            break;

        // Standard activities, not considered working lixes
        case LixEn::WALKER:
        case LixEn::LANDER:
        case LixEn::RUNNER:
            p = 3000;
            break;

        // Builder can re-assign itself if the user has this allowed in
        // his settings. This queues another set of bricks.
        case LixEn::BUILDER:
        case LixEn::PLATFORMER:
            if      (new_ac == ac
                && (!personal || useR->multiple_builders)) p = 1000;
            else if (new_ac != ac)                         p = 4000;
            else                                           return 1;
            break;

        // Usually, anything different from the current activity can be assign.
        default:
            if (new_ac != ac) p = 4000;
            else return 1;

    }
    // To break ties:
    // Climbers, runners and floaters have higher priority when doing the
    // same as a normal lix
    // Exploders also have raised priority.
    // (If batter is to be assigned, exploders may have lowered priority
    // instead, this is also a user setting.)
   
    p += (new_ac == LixEn::BATTER && useR->batter_priority
          ? -updates_since_bomb : updates_since_bomb);
    p += 400 * runner + 200 * climber + 100 * floater;
    return p;
}

If two have the exact same priority even after breaking ties via old permanent abilities, then the first to spawn has priority. This is different than in DOS Lemmings, where the latter spawned has priority, which was almost always the undesired one.

Picking the earlier-spawned isn't done in the above code, it's done in the calling code.

In the drawing code, higher-priority lems are drawn later = on top of less-priority lems. This is quite important to get right, not doing this is a subtle but annoying mistake. ;-)

Vocabulary I use: skill = resource in the skill bar, activity = currently performed thing, ability = permanent (climber, ...) that isn't necessarily the current activity.

-- Simon


mobius

I thought of some simple but helpful things;

-being able to select skills and assign them while paused (assigned un-pauses)
-fast forward option, possibly 2 speeds. And while I know people disagree with me, I'd prefer a hold down button for FF instead of toggle. [or an option for that.
-10 second time skip. [just another type of FF really but useful non-the-less]
-replays

and for the editor, here are some options;

-the designer can make custom preview messages or notes on each level and hints that can be accessed while playing in the level (see Cheapo).
-the option to organize your levels into a small pack or a larger pack its own with ratings.
-perhaps the ability to use a mouse wheel to scroll through things, like choosing a terrain piece. I find the current menu in Lemmix a little annoying. The Lix terrain selection menu is also nice; it's a large window that opens us to display all pieces in a grid. I'd prefer one that's a little smaller though.
-using tabs on the editor menus might be nice.
-if there's any way to adjust the way terrain is highlighted in the editor that would be nice. What I mean is notice how a the steel pieces in your picture; the yellow square extends too far to the right. This is especially an issue in Lemmix when using the 'Align' function.

-I understand the reasoning behind the background image. Plus, I sort of find any kind of background other than black can distract from the level and be harder on the eyes.

-----------
other RR options;
having a limit on the maximum RR.
being able to put the limits wherever the designer wants. (including no limits)

sorry I keep talking in separate posts, but there's a lot of things to consider and I don't have them all written down or anything. Love the shuffle option btw.  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