Trying to do a Lemmings engine
Hello community,
I'm trying to do a Lemmings remake with MMF2, but I'm having some trouble as I'm still a bit new to the program.
First I want to perfect out the engine before I move on to making levels. I got a "test" level that only includes a trapdoor and a flat ground to test the Lemmings' individual walking and falling. That's already where I have problems.
I'm using a "sensor" that detects if the lemming is on some kind of ground or not. If the sensor detects floor, the lemming should stop falling and walk, and if the sensor doesn't detect any floor, the lemming should start to fall. (I know it's not every condition in a Lemmings game, but it's better to smoothen out the basics first.) I got this programmed into the behaviour of object "lemming".
And now, the problem. I can't get the sensors to detect individually. If ANY sensor does not detect ground, then ALL the lemmings fall. (The "sensor overlaps ground" condition is in the "lemming" object's behaviour too.)
How can I solve this problem?
Thanks in advance. I might have more questions if this gets solved.
Re: Trying to do a Lemmings engine
So if your lemmings are duplicates , spread value in Lemmings so that each have a different ID. Eperiment with qualifiers, Also the detectors.
Marv
Re: Trying to do a Lemmings engine
Use spreading values and compare for them to be equal in all the events necessary
Re: Trying to do a Lemmings engine
Actually, I'm making a for each extension that might be useful for this!
Re: Trying to do a Lemmings engine
That's great to hear, Jamie! Thanks!
Re: Trying to do a Lemmings engine
Okay, I got the spread values set up for both the lemming and the sensors. I still have the problem I mentioned though.
RickyRombo suggested using *On loop + AltVal("Lemming") = Loopindex("loop") + AltVal("Detector") = AltVal("Lemming") for each event regarding overlapping between sensor and ground, but it didn't work...
Re: Trying to do a Lemmings engine
heheh...
sorry :(
I don't know why it wouldn't work - wait. DOH! try getting rid of the loop...
* Start of frame
-Spread value 0 in alt value A of Lemming
-Spread value 0 in alt value A of Detector
*Alt value A ("Detector") = Alt value A("Lemming")
-Set position of Detector (to wherever)
*Detector overlaps (whatever)
+Alt value A of ("Lemming") = Alt value A("Detector")
-(Do collision events)
Re: Trying to do a Lemmings engine
Doesn't work either :(
Got kicked out of chat for no reason and can't seem to reconnect.
Re: Trying to do a Lemmings engine
same, server must be down
Re: Trying to do a Lemmings engine
Okay guys, status update!
RickyRombo helped me setup the basic movement engine for the Lemmings and I now implemented slope support. You can test the movement here
http://www.vertigofx.com/jrkstudios/lem/lemmings.exe
Please comment if the engine gives you the typical Lemmings feeling (just by movement, there's no interaction possibilities yet).
Now that I'm (probably) done with the basic moving engine I'm going to do the interface, lemming actions (climbing, building, ...) and then the camera view.
I have no clue how to set up either of those... could you help me out there? I got the gfx all ready.
Re: Trying to do a Lemmings engine
I'm a huge Lemmings fan, my Da and I spent years in front of the PC getting those little guys home, so naturally I wanted to make my own.
I looked at many examples and have tried many times to create my own Lemmings games. Every time I hit problems. Movement, skills, interaction with a changing environment, what a nightmare!!!
Early this year I hit success. I created a test engine and did some work and 99% of the problems I had were gone (I still have some niggles to work out). What was my solution?
Everything had to be an unique individual object.
All these failed attempts were in relation to having one Lemming Active Object and deploying it multiple times into my game environment. Movement was fairly easy... If you just wanted to walk back and forward!! Start digging holes, or tunnels, and all mannor of issues arose with Lemmings getting stuck or acting in weird ways. Assigning skills to the guys was also a nightmare.
My new engine has every single Lemming as an individual Active Object. If a Level has 100 Lemmings, that's 100 Lemming Active Objects. I also did what you did, apply sensor objects around each Lemmings, which again are individual objects. Suffice to say, my Object list can be extensive!!!
In the Event Editor, I also had to code for each individual object; Lemmings and their sensors!! I tried going with Qualifiers but had issues so I now code for each object on its own. The result, the Event Editor is filled with tons of code.
But it works :)!!!
Can a successful Lemmings engine be made using one object for the Lemmings and any sensors they have? I don't think it can. Of course, someone could prove me wrong, but after years and years of working to do a Lemmings game of my own, I have drawn the conclusion that if you want a hassle free engine that works as a Lemmings engine should, individual objects is the way to go.
Re: Trying to do a Lemmings engine
I'm just using one lemming object and it seems to work fine up to now.
Having each Lemmings as individual objects AND sensors... that'd be a huge amount of work, isn't it?
I myself got rid of any sensors, I'm using "collision mask" to determine slopes and obstacles and such
I'm just about to create the "actions" for the lemmings (here I DO use different objects for the different tasks).
So your lemming engine works? Have you already created some levels, I'd like to play. :)
EDIT: Oh, and by the way, guys!
How should I make the lemmings "destroy" terrain when using Bomber, Basher, Miner or Digger? I don't think it's possible to remove just parts of a backdrop, is it?
Re: Trying to do a Lemmings engine
Hi Ramon.
From what I've read of your work to date, all you have at the moment is the movement. As I said above, that was fairly easy to get working with one Lemming Object deployed multiple times, it's when doing the skills that the real headache started. When building stairs I had Lemmings walking through them instead of up, or if they hit their heads they would get stuck. When tunnelling, Lemming hitting the walls of the tunnel would start spinning on the spot, or stop, or they would turn around as they should but so would some of the others.
I tried for YEARS to make this system work, one Lemming Object, and always failed. It was when I decided to do individual Lemming objects and sensor objects that I got an engine that worked (still have some issues with stair building).
I don't have anything playable beyond the test engine I made (I hit a creative slump in March and didn't pull out of it till October!!). But now that I have found a technique that works, I will make a Lemmings game down the road.
Yes, you are right, it is a HUGE amount of work. As I said above, the Event Editor is filled with tons of code. What I do is I create a group into which I code one Lemming fully. When he's working, I create groups for all other Lemmings and copy and paste the code in, I then go down through it and make the changes to reference each Lemming and sensor in turn. But yes, it's extensive work!!
I'm not trying to put you off your project, by all means, if you get a fully working Lemmings engine going the easy way I'll be the first to commend you ;).
As for destroying terrain, use the Paste Into Background action. For example, for a Bomber, create a black Active Object in the shape of the explosion at it's largest. When the Lemming explodes, you create the black explosion at the Lemmings position and then paste it into the backgroun with no affects on collision. This will remove the land. For the other skills, basher, miner, digger, create simular black shapes and move them with the Lemming, pasting into the background as you go.
Re: Trying to do a Lemmings engine
Here is a single level from Bots, a game I started to throw together at the start of this year.
http://www.iol.ie/~pkb/Bots.zip
As you will see, it's not perfect. Sometimes the Bots get stuck or walk backwards. Take into account that I have not touched this since March. But this will give you a look at how the Digger tool works, the other cutting tools work the same way. Also note how much is in the Event Editor and there are only 10 Bots in this level!!
Re: Trying to do a Lemmings engine
Hey Paul, thanks for the demo.
Marv
Re: Trying to do a Lemmings engine
Thanks Paul!
Guys, I'm nearly done with the engine. I'm not missing a lot, but there are two actions that are bothering me.
Bomber and blocker.
The bomber is set up all correctly; however when you click on a lemming, the countdown number (from 5 down) should appear above it and stay above it, whereever the lemming moves to. It works fine with one lemming, but when I apply bomber to several lemmings, the positions of the numbers sometimes screw up (lemmings switch countdown numbers or one lemming gets more countdown numbers).
I thought maybe you can help me with that and tell me if it's possible to make a "countdown number" object stick to a certain lemming only?
The second problem, blocker. I have absolutely no idea how to implement that.
All it should do is this: A blocker stays in position. When a lemming touches the blocker from either side, they just turn around and continue to walk. If they fall "into" the blocker from above, they should NOT turn around.
I tried around with a kind of sensor but it failed horribly.
Note that when a lemming turns into a blocker only its GFX and an alternate value are changed, the object stays "lemming".
Any help? Would be greatly appreciated :)
Re: Trying to do a Lemmings engine
For the bomber, use alterable values of that specific lemming. Then make a counter for each lemming and spread a value through them (if you can... I don't remember if they have alt values) and have them display the timer of the lemming that has the same id. Then, when greater than 0, make it visible, and when less than or equal to 0 make it invisible.
For the blocker, all you really have to do is make the blocker add a backdrop as an obstacle, though I'm not sure whether it changes the direction of the lemming. Also, if your lemming is falling 2 px at a time then you might want to make sure it doesn't fall through too far and think it's hitting a wall and turn around.
Try those and see if it works.
Re: Trying to do a Lemmings engine
Hm, I didn't quite get what you said.
I do have an Alterable Value for the Lemming, which is calculated by "always: spread value"... but isn't it so that each time a new lemming is created, the value of each existing lemming is changed by 1?
For blocker: Wouldn't work because, as I said, if there's a blocker in a place where the terrain has been "destroyed" by pasting "not obstacle"-objects into backdrop, those would be deleted and the actual backdrop would be "recreated".
Another question to those of you who played Original Lemmings: How would it be best to set up the Level Select screen? Have one frame with many actives changing when you select another level or have one frame for each level?
Re: Trying to do a Lemmings engine
Hi Ramon. I think having another frame would be better and less confusing for coding.
Marv