Here I Go Again!

Started by GuyPerfect, September 16, 2009, 12:08:14 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

GuyPerfect

Hey, an update! And I got a lot done!

http://perfectkiosk.net/lemmings/SelectIt.png" alt="" class="bbc_img" />

Things I got done today:

  • I gutted the code behind the user input handler and re-did it. I noticed I was re-writing the click-and-drag code lots, so I set up a dragging system and now anything that needs to be dragged by the mouse is taken care of automatically. Made life a lot easier. Drawing routines were isolated into their own functions as well, so I can concentrate on each little bit of the visual display without making a huge function with a zillion variables declared at the top. (-:
  • As the picture shows, element selection is implemented. A selection box can be drawn to pick elements, and selected elements can be dragged around or deleted. If you click-and-drag with nothing selected, it will drag whatever you clicked on. If you didn't click on anything, it starts drawing a box. If you want to draw a box even when clicking on something, just hold the Ctrl key.
  • When nothing is selected, the element the mouse is hovering over will be hilighted. This actually gives me a lot better idea of where things are situated, since things like angled slopes are still aligned to the grid and it's nice to see it in graphical form.
  • Various bug fixes and/or finishing up existing features took place. In particular, the feature that allows placment of the default screen position was fixed up and its graphics are a bit bolder now.
  • Dragging with one mouse button and clicking the other will cancel the current operation entirely. This applies to panning the display (dragging with the right mouse button), resizing the level, drawing a selection box, moving elements and moving the default screen position.
.
There's only so much playing around one can do without adding elements, but that's the next step. What I did do, however, was make an arguably more interesting level out of an existing one with two simple clicks of the mouse. (-:

http://perfectkiosk.net/lemmings/WaitASec.png" alt="" class="bbc_img" />



EDIT:
I had some extra time tonight, so I did some touch-up work to tweak things the way I like them. I've made the following changes:

  • The "hover hilight" for when you mouse over an element now continues to appear even if other elements have been selected.
  • Holding the Shift key allows you to draw a new selection box without losing your old selection. This allows you to select multiple groups of elements without selecting everything in between as well.
  • Holding the Ctrl key also allows you to draw a new selection box, but elements bound by it will invert their selection state: those that are selected will become unselected in addition to those that are unselected becoming selected.
  • Both the Shift and Ctrl keys will force a selection box to be drawn, even if you click on an existing element. With neither key pressed, the element you click on will immediately be dragged.
  • The default screen positioner, which was formerly mapped to the Shift key, is now mapped to the Spacebar. Additionally, dragging the default screen position requires clicking within the box's bounds instead of anywhere in the window.
  • The "drag with the left mouse button then click the right button" cancel feature has been tested with all these new modifications.
.
For those who are curious, the default screen positioner just draws a green box where the screen will be when you first load up a level in-game before scrolling around:

http://perfectkiosk.net/lemmings/Positioner.png" alt="" class="bbc_img" />

Minim

I wonder how you managed to reverse the level (in other words putting the entrance in the exit spot and the exit at the start point).
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

GuyPerfect

I... clicked the exit and dragged it up under the entrance, then clicked the entrance and dragged it over to where the exit used to be...

GuyPerfect

At long last, I have made a Lemmings level! It's my first one ever for any game!

Edit go!

http://perfectkiosk.net/lemmings/Level1OutOfAction.png" alt="" class="bbc_img" />

Things I got done today:

  • Revised the element memory to put everything in the same big list. Checking element type (tile, preset, object, etc) is easier than having one group for every type of element. It also allows for levels to be designed that temporarily break the game limits, but to delete the extra objects later.
  • New element placement is implemented. You just pick what type of element you want, then click where you want it to go. For water, steel and presets, you can click-and-drag to specify how many blocks horizontally and vertically will be represented by the element. That big grid of grey squares in the image is just one element.
.
Well huh. I expected that list to have more bullets. No matter. I've got a few loose ends to tie up, but for all intents and purposes, the application is now fully capable of authoring and editing levels for Lemmings 2. Editing day... is today!

This is the end of the line as far as what I can do with just the preview interface. I cannot make it any more functional at this point without implmenting additional UI elements, so it's time to sit down and brainstorm exactly what I want. Figuring that out will take more time than actually doing it, but I like to have options. (-:

I've attached the level file for this level to this post. Just replace the game's LEVEL000.DAT with this one (but be sure to backup the old one!) Think you can beat it 100% on your first try? I must warn you: it's reeeeeeeeeeeally hard! (-:

http://perfectkiosk.net/lemmings/Level1InAction.png" alt="" class="bbc_img" />

Dullstar

When can we start editing?

GuyPerfect

Aw, snap. I left my crystal ball in my gym locker again. I'll have to get back to you on that.

On a more honest note, I don't know when I'll be able to release the editor because I can't pinpoint when it'll be done. There's still a number of things to take care of. However, most of the heavy-duty mechanical work is already done, so it's just a matter of enabling the user to tell the program what they want to do.

The following still needs to be taken care of:

  • A graphical interface needs to be made to give the user something to click on so they can select what element they want to add to the level. In its simplest form, this would just be a box with little squares in it, and the squares show what each element looks like.
  • The user needs to be able to specify level meta data, which includes the skills, level name, gold requirement (can lose X and still get gold), time limit and release rate. This can basically be taken care of with a number of text-entry fields.
  • Save/Load needs to be implemented. In addition to the proprietary file format I'll conjure up, there's some system-specific directory navigation code I need to build into the cross-platform API that the project is built on. I'd likely devote a whole day to this one.
  • Some elements have properties. Any tile or preset can be set in the background instead of terrain, and steel blocks and the like can repeat both horizontally and vertically. The user needs to be able to view and specify these parameters.
  • A few element manipulation functions need to be introduced, such as Bring to Front/Send to Back, Undo/Redo and Cut/Copy/Paste.
  • Profit!

Dullstar

Profit?  You aren't planning on selling this, are you?  That would be very stupid.

Pooty

Brilliant work so far. Looking forward to the end result. http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" />

I played your custom level, and eventually got gold (I fell for the trap http://www.lemmingsforums.com/Smileys/lemmings/sad.gif" alt=":(" title="Sad" class="smiley" /> ). I did notice a few invisible block boundaries that my lemmings kept bumping into, mainly at the bottom of the level. Was that intended?

http://www.lemmingsforums.com/index.php?topic=176.msg5813#msg5813">Quote from: Dullstar on 2009-10-01 16:59:38
Profit?  You aren't planning on selling this, are you?  That would be very stupid.

Not likely. I think by "Profit!", he means it'd be completed and released. http://www.lemmingsforums.com/Smileys/lemmings/wink.gif" alt=";)" title="Wink" class="smiley" />
SEGA Master System version
100% on 110/120 levels (92%). Other levels [Lemmings lost]:
Fun 03 [3], 06 [2], 18 [5]   
Taxing 19 [5], 27 [1], 28 [3]
Tricky 15 [5], 17 [2]
Mayhem 19 [7], 26 [10]

ccexplore

http://www.lemmingsforums.com/index.php?topic=176.msg5813#msg5813">Quote from: Dullstar on 2009-10-01 16:59:38
Profit?  You aren't planning on selling this, are you?  That would be very stupid.

I'm pretty sure he's kidding.  Right?  Right?  http://www.lemmingsforums.com/Smileys/lemmings/shocked.gif" alt=":o" title="Shocked" class="smiley" /> http://www.lemmingsforums.com/Smileys/lemmings/XD.gif" alt=":XD:" title="XD" class="smiley" /> http://www.lemmingsforums.com/Smileys/lemmings/winktounge.gif" alt=";P" title="Wink-Tongue" class="smiley" />

http://www.lemmingsforums.com/index.php?topic=176.msg5812#msg5812">Quote from: GuyPerfect on 2009-10-01 16:57:13
The user needs to be able to specify level meta data, which includes the skills, level name, gold requirement (can lose X and still get gold), time limit and release rate. This can basically be taken care of with a number of text-entry fields.

How about the size of the level area?  Just making sure you didn't leave something out from the list.  Just double-check with the level file format to make sure you covered all available level metadata.

http://www.lemmingsforums.com/index.php?topic=176.msg5812#msg5812">Quote from: GuyPerfect on 2009-10-01 16:57:13
A few element manipulation functions need to be introduced, such as Bring to Front/Send to Back, Undo/Redo and Cut/Copy/Paste.

Don't forget "Select All"!

Here are other possible features to consider (not necessarily for version 1 though); no doubt you already have your own list though:

- option to show objects' trigger areas, that is, which tiles of the object are actually the ones that Lemmings interact with (for example, only a small part of the exit object actually causes the lemming to exit, the rest being just graphics).  Showing can be done using translucent highlighting like how you're showing selections right now, except with a different color (eg. magenta).

- a level mini-map, showing a reduced-size version of the level, that you can click on to quickly jump (ie. scroll the view) to the corresponding area.

- a keyboard/mouse/menu shortcut to set the zoom and/or viewport size, so that exactly one screen's worth of level area is shown in the editor (ie. what you see is exactly how much fits onto the screen at any time when actually playing the level).

- a way for the user to tell the editor to show the animation of a specific object.  For example, objects like entrance trapdoors and certain traps do not loop their animation continuously, but instead are only played once or triggered.  Yet in the level editor, you may want to, for example, see how the entrance trapdoor looks with the surrounding terrain before and after it's fully opened.  It would probably be annoying to loop such objects' animations continuously, so the alternative would be a way for the user to tell the editor to play the animate sequence for a specific such object on demand.

- an eraser feature to erase individual tiles, so that you can for example, place a preset onto the level, but then take out some of the tiles from it.

- possibly a selection mode that acts on individual tiles rather than presets (it's hard to tell right now what resolution your selection method acts in), or vice versa.  There are cases where one may want to manipulate an individual tile, and other case where the user implicit wants to manipulate not just the one tile, but the entire preset combination that the tile belonged to.  If this is already implcitly available then please ignore.

- ability to have multiple levels open at once.  Equivalently, support having multiple instances of the editor running, and have the cut/copy/paste feature work across instances.  It's probably acceptable to not actually show more than one level at a time (eg. maybe there are tabs and you need to click on a tab to view the corresponding level).

- possibly a UI that lets you manipulate the ordering of levels within a levelset without actually opening the levels.

- allow selection to be moved using keyboard arrow keys as well as being dragged by mouse.  Though I suppose now that the level is tile-based (so you can't positioned things at arbitrary pixel locations), this may be less necessary.

- support for the user to define their own presets (ie. their own combination of tiles to treat as one unit).  These user-defined presets don't necessarily have to be stored in the Style files/directories like the ones that come with the game.  Defining a preset may be as simple as an option that takes the current user selection of tiles as a preset.

Actually, I think after you get to the "profit" stage as noted in your post of things-to-do, I think that would be the time to do either a public or limited release, since at that point, I think you need feedback from multiple users to properly determine what additional features are important enough to be considered adding or improving.

GuyPerfect

Hey, thanks for the feedback, guys! I get to make a lot of quote blocks now! *Cracks knuckles* Let's get this started.

http://www.lemmingsforums.com/index.php?topic=176.msg5813#msg5813">Quote from: Dullstar on 2009-10-01 16:59:38
Profit?  You aren't planning on selling this, are you?  That would be very stupid.

It's an expression that you'll see around the internet. It's usually used in the form of "Step 1: Form a plan. Step 3: Profit!" or some-such.


I did notice a few invisible block boundaries that my lemmings kept bumping into, mainly at the bottom of the level. Was that intended?

It's a http://www.lemmingsforums.com/index.php?topic=34.msg5463#msg5463" class="bbc_link" target="_blank">known bug. If we can figure out what causes it, we should be able to do something about it.


http://www.lemmingsforums.com/index.php?topic=176.msg5815#msg5815">Quote from: ccexplore on 2009-10-01 17:34:26
How about the size of the level area?

Level boundaries are specified by dragging those dotted lines bordering the preview in the editor interface. Since levels can be arbitrarily extended or collapsed in any of the four directions, I think it'd be better to merely display the level's width and height in the meta data window than to allow them to be edited there.


http://www.lemmingsforums.com/index.php?topic=176.msg5815#msg5815">Quote from: ccexplore on 2009-10-01 17:34:26
- a way for the user to tell the editor to show the animation of a specific object.  For example, objects like entrance trapdoors and certain traps do not loop their animation continuously, but instead are only played once or triggered.  Yet in the level editor, you may want to, for example, see how the entrance trapdoor looks with the surrounding terrain before and after it's fully opened.  It would probably be annoying to loop such objects' animations continuously, so the alternative would be a way for the user to tell the editor to play the animate sequence for a specific such object on demand.

What I'd like to do is that for the entrances, traps and a few other "limited animation opportunity" objects, to simply have them go through their thing when the mouse hovers over them.


http://www.lemmingsforums.com/index.php?topic=176.msg5815#msg5815">Quote from: ccexplore on 2009-10-01 17:34:26
- an eraser feature to erase individual tiles, so that you can for example, place a preset onto the level, but then take out some of the tiles from it.

I'd already planned to have an option to split a preset into its elemental tiles. Somtimes you just need to pick it apart, you know?


http://www.lemmingsforums.com/index.php?topic=176.msg5815#msg5815">Quote from: ccexplore on 2009-10-01 17:34:26
- ability to have multiple levels open at once.  Equivalently, support having multiple instances of the editor running, and have the cut/copy/paste feature work across instances.  It's probably acceptable to not actually show more than one level at a time (eg. maybe there are tabs and you need to click on a tab to view the corresponding level).

Fortunately, the way I programmed this thing allows for this kind of instantiation. I learned THAT lesson a long time ago. (-: Like you said, this would be an option to consider at a later time, but it's a good idea and it wouldn't be hard to do.


http://www.lemmingsforums.com/index.php?topic=176.msg5815#msg5815">Quote from: ccexplore on 2009-10-01 17:34:26
- possibly a UI that lets you manipulate the ordering of levels within a levelset without actually opening the levels.

There will be a little mini-interface for patching levels to the game, and you can select what stage goes where at that time.


http://www.lemmingsforums.com/index.php?topic=176.msg5815#msg5815">Quote from: ccexplore on 2009-10-01 17:34:26
- support for the user to define their own presets (ie. their own combination of tiles to treat as one unit).  These user-defined presets don't necessarily have to be stored in the Style files/directories like the ones that come with the game.  Defining a preset may be as simple as an option that takes the current user selection of tiles as a preset.

I briefly considered doing this, but the tiles used in the game are rather explicitly made for use with the provided presets. The most effect you'd get out of such a feature is gluing multiple presets together; in which case you might as well just use two.


http://www.lemmingsforums.com/index.php?topic=176.msg5815#msg5815">Quote from: ccexplore on 2009-10-01 17:34:26
Actually, I think after you get to the "profit" stage as noted in your post of things-to-do, I think that would be the time to do either a public or limited release, since at that point, I think you need feedback from multiple users to properly determine what additional features are important enough to be considered adding or improving.

My normal channels haven't been receiving a lot of interest for beta testing this project, so I'll probably just post it in this thread for you guys to give feedback on.

Yawg

I'm sure I can speak for everyone on this forum when I say we would be honored to serve as the beta testers  http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" />

Looks like it's shaping up to be a great project, and it may be just what I need to get out of the creative slump I've found myself in since the start of classes...
Finally released my 6th level pack! Ten levels intended to push you quite a bit beyond the expectations of Mayhem/Havoc; check 'em out and let me know what you think!

http://camanis.net/lemmings/levelpacks.php?info&pack=174

Clam

http://www.lemmingsforums.com/index.php?topic=176.msg5816#msg5816">Quote from: GuyPerfect on 2009-10-01 18:05:53
I did notice a few invisible block boundaries that my lemmings kept bumping into, mainly at the bottom of the level. Was that intended?

It's a http://www.lemmingsforums.com/index.php?topic=34.msg5463#msg5463" class="bbc_link" target="_blank">known bug. If we can figure out what causes it, we should be able to do something about it.

Oh, come on. Don't even try to tell me that all those blocker fields weren't intentional. You've hacked this game to death and then some - you knew exactly what you were doing. And the steel block turning into a trap is just ridiculous. Please, please, PLEASE don't even consider including such BS in the editor's capabilities. There's absolutely no chance that anything good will come of it.

[/vent]

I'm going to calmly assume this level was intended merely to demonstrate some of the lesser-known "features" that this game provides, and not specifically to butcher the game and annoy people. (Which, in case you couldn't tell, you succeeded at http://www.lemmingsforums.com/Smileys/lemmings/wink.gif" alt=";)" title="Wink" class="smiley" />)

GuyPerfect

I've done one last pass through the code to tie up all the loose ends (that I could think of). Now, it's just about as done as it can be until I get those new graphical elements implemented.

  • Tile ID 0 is now treated as nothingness throughout the application. This applies to loading tiles from the level as well as drawing/saving presets with that tile in them.
  • The mouse picker now makes three passes: first for objects, then presets, then tiles; according to the order they are drawn to the screen. This ensures that what you click on is what you select.
  • Maximum level dimensions are now restricted. Dragging one boundary will simply stop when it reaches the max, but dragging two boundaries at once will turn red if the desired level size is not possible.
.

http://www.lemmingsforums.com/index.php?topic=176.msg5821#msg5821">Quote from: Clam Spammer on 2009-10-01 21:42:48
Oh, come on. Don't even try to tell me that all those blocker fields weren't intentional. You've hacked this game to death and then some - you knew exactly what you were doing. And the steel block turning into a trap is just ridiculous. Please, please, PLEASE don't even consider including such BS in the editor's capabilities. There's absolutely no chance that anything good will come of it.

The invisible wall(s?) aren't in the level data anywhere. I don't know what causes them. If you do, any information would be appreciated.

As for hiding traps behind steel blocks, it's just a matter of arranging objects in order, and will be possible with the editor. I'll also throw in an option to render steel blocks as normal dirt tiles, or even as background tiles. There's more potential agony than what I've done in the level I made a few posts ago.

When dealing with user-generated content, you gotta assume that crap will be made. There's no avoiding it. However, if you know and trust the person you're using levels from, you won't have anything to worry about.



EDIT:

Eh, having second thoughts about the dirt-steel. I can't think of any reasons to use it except to annoy people. I remember that block at the end of Medieval 5 and how bogus it felt, and I certainly don't want people to do that just because they can.

I'll still code in the option just in case I do need it in the future for whatever reason, but it will be disabled until such a time.

Dullstar

 I'd be glad to test the editor, if I could...  I've wanted to edit this game for quite a while.

Clam

http://www.lemmingsforums.com/index.php?topic=176.msg5822#msg5822">Quote from: GuyPerfect on 2009-10-01 21:54:45
The invisible wall(s?) aren't in the level data anywhere. I don't know what causes them. If you do, any information would be appreciated.

Sorry, I still don't believe that. Considering the layout of weird invisible stuff leaves a convoluted route to the exit, whereas if it really was unknown and random, it would more than likely block the exit entirely and make the level impossible. And I'm fairly certain this isn't the same as the glitch I mentioned in the other thread (though it may be related) - that required you to use a blocker, basher and exploder to make a temporary invisible wall appear.


I know you can't necessarily stop this sort of nonsense from creeping into custom levels (heck, if you want it that badly you can hex-edit it in), but I would like to think you can prevent it in the editor. For example, you could:

- Delete traps that get buried behind terrain when editing, just as you would with terrain.
- Disable setting as background for terrain pieces, except for those which were clearly intended to be background objects (polar bears and the like). And preferably make those background-only (i.e. can't be used as terrain) and group them along with the trapdoors and exits to avoid confusion.
- (This one you've acknowledged already) make steel act as steel and nothing else.


The discoveries posted in this thread actually disturb me somewhat. Unlike in the original Lemmings (and Lemmings 3 as well), there's some surprising stuff in here that's just unbelievably bad, and will do (and can do) nothing but break the game. Is it even a good thing for people to know about all this? Well, to avoid being unfair on those who haven't seen this thread, it probably is. But allowing it in the editor is just asking for some noob to pick up the editor, find all this new stuff, and make a bunch of "groundbreaking" game-breaking levels. You can make it difficult without having to make it impossible - and considering how unwilling people have been to make levels for this game (even with a rudimentary editor available), I'd say that's good enough.


Sorry to rant, but I feel quite strongly about this. http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" />