Aikocho Posted November 10, 2009 Report Share Posted November 10, 2009 I figured I'd make this post for one of the oldest, yet one of my biggest problems as an MMF2 programmer. That was making a platformer engine with out using extensions. Though, as much as I know about stactic movement, the anti-sink has been a great flaw. But, what made it worse, was programing jump through platforms. I tried to create dozens of ways to make jump through plat forms, but none of them hardly did the trick. I made this post to see how I can relearn stactic platfoming. Link to comment Share on other sites More sharing options...
Asuma Posted November 11, 2009 Report Share Posted November 11, 2009 Statics are dead easy, so is Anti-Sink You can sue MMF2's built-in fastloop for that. Link to comment Share on other sites More sharing options...
USC Posted November 11, 2009 Report Share Posted November 11, 2009 As for the platform issue, I imagine you could have a 'platform' sensor, set far enough above Sonic that if he jumps from under a platform, it'll be a little above the platform before Sonic's top sensor hits it. Then you could write code like so... *If Sonic's top sensor hits background *And if Sonic's platform sensor hits background *And if Sonic ISN'T overlapping the background (IE: He's not halfway through the platform) ---------> Stop Sonic's jump ---------> Enable Sonic's ground sensor *If Sonic's top sensor hits background *But if Sonic's platform sensor DOESN'T hit background ---------> Don't stop Sonic's jump ---------> Disable Sonic's ground sensor (So he doesn't get stuck halfway through it) Link to comment Share on other sites More sharing options...
LarkSS Posted November 12, 2009 Report Share Posted November 12, 2009 Statics are dead easy, so is Anti-Sink You can sue MMF2's built-in fastloop for that. Don't you know that "fastloops" are simply the way in MMF2 to repeatedly process a set of events by an amount you specify, which on its own has absolutely nothing to do with static engines or "anti-sink"? You should have actually tried explaining the procedure dude. =[ Like USC did. =] Link to comment Share on other sites More sharing options...
Asuma Posted November 12, 2009 Report Share Posted November 12, 2009 That's they way I do it.=E If GroundSensor2 is overlapping "0.Group" --Set Fastloop "nosink" to 32 On loop "nosink" If GroundSensor is overlapping "0.Group" ---Set Y Position of PlayerMask To Y( "Mask" )-1 ---Set Y Position of GroundSensor To Y( "GroundSensor" )-1 ---Set Y Position of GroundSensor2 To Y( "GroundSensor2" )-1 Link to comment Share on other sites More sharing options...
Death_Daniel Posted November 12, 2009 Report Share Posted November 12, 2009 What i would of done is have a flag while your jumping that temp disables collision with the floor. Like Flag1=0 ("Bottom") Overlaping Group 0 *COLLISION CODE HERE* Otherwise go right through. Otherwise the flags would be triggered by many things such as, jumping variables and/or YSpeed. Maybe I'll make an example, for the sake of this thread. Link to comment Share on other sites More sharing options...
USC Posted November 12, 2009 Report Share Posted November 12, 2009 @Death_Daniel: The only problem with *just* disabling the ground sensor is that I'm sure he doesn't want to be able to jump through ALL backgrounds. IE: If there's a low ceiling or something, he'd probably want Sonic to not be able to jump through it. Link to comment Share on other sites More sharing options...
Death_Daniel Posted November 13, 2009 Report Share Posted November 13, 2009 @Death_Daniel: The only problem with *just* disabling the ground sensor is that I'm sure he doesn't want to be able to jump through ALL backgrounds. IE: If there's a low ceiling or something, he'd probably want Sonic to not be able to jump through it. Thats a good point. I didn't think of that. I was thinking towards the Activeplatform......Not backdrop. Edit: Azu is also talking about Active ("group0")s and ("group1")s. Link to comment Share on other sites More sharing options...
LarkSS Posted November 13, 2009 Report Share Posted November 13, 2009 @Azu: You're using the fastloop to run the second overlap check 32 times, which is the same as just copy/pasting it so there are 32 copies. =P Much better example though. My only concern would be that I don't know what groundsensor is compared to groundsensor2, so if you made a quick screenshot of the two sensors around a situation where the fastloop would be triggered and put the screenshot up with your post, it would compliment your technique that much more. ;> Link to comment Share on other sites More sharing options...
Recommended Posts