Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

My First Real Gimmick


Spykid

Recommended Posts

Ok guys, I have learned a fair amount on CF2.5 now and I have designed my first level. But, I have a major gimmick I would like to add... Quick sand as seen in sandopolis and Oil Desert. I have a good idea of how I would like it tow work, but I was just wondering, How would I go about programming something like this...

 

Sadly I do not yet have a programmer on board so I am having to do a lot myself anyway. So any ideas would be great. This is literally a simple gimmick for me to grasp the concept a little bit more

 

~Thanks

Link to comment
Share on other sites

Ok guys, I have learned a fair amount on CF2.5 now and I have designed my first level. But, I have a major gimmick I would like to add... Quick sand as seen in sandopolis and Oil Desert. I have a good idea of how I would like it tow work, but I was just wondering, How would I go about programming something like this...

 

Sadly I do not yet have a programmer on board so I am having to do a lot myself anyway. So any ideas would be great. This is literally a simple gimmick for me to grasp the concept a little bit more

 

~Thanks

 

I assume we are talking about Sonic Worlds right?

 

If I were doing quicksand in Sonic Worlds, I'd probably go for something cheeky. Like when the player enters the quicksand, an invisible moving platform is spawned under them that sinks slowly and while they are standing on it, their jump strength is reduced. I'm sure there are other less cheeky ways to do it... but they would probably involve creating another active state for the player and it would take more work on your part I think.

Link to comment
Share on other sites

Ha! I love it, DW. I would go with that one.

 

here is how i would approach it: (this is probably a bit advanced)

 

create a new Character Attribute section that's activated when quicksand of others = 1, and change the physics to be all wonky, with weird acceleration, jump strength, rolling, etc, and constantly subtract yspeed. Make sure to set the max yspeed really low though.

 

You can do the same thing to make ice physics.

  • Like 1
Link to comment
Share on other sites

Ha! I love it, DW. I would go with that one.

 

here is how i would approach it: (this is probably a bit advanced)

 

create a new Character Attribute section that's activated when quicksand of others = 1, and change the physics to be all wonky, with weird acceleration, jump strength, rolling, etc, and constantly subtract yspeed. Make sure to set the max yspeed really low though.

 

You can do the same thing to make ice physics.

 

Well, the problem with this approach for quicksand is that the player has to be treated like they are in contact with the ground and if they are in contact with something that we really consider a solid, they'll be constantly pushed out of the solid. You might be able to get around it by setting the ground value to 1 every frame at some point between all of the sensors getting reset and all of the activity that actually uses that information, but it's a lot harder to make the gimmick self contained that way.

 

You are right though, acceleration and top speed probably need to be tweaked in quicksand as well. Going from what I studied of the S3K quicksand just now, it appears that they apply a constant amount of  the whole time you are in the quicksand whether you are jumping or not as well. In S3K, the quicksand isn't treated as a solid, and it only actually lasts for about 32 pixels.  When you are in it, you are treated as running ungrounded except you are able to jump. Jumping behavior appears to be pretty much normal too, at least for the regular quick sand.

 

You could probably get away with just making it a small collision field that forces your action to run, grounded to zero, and maxes out your x speed in either direction at what you would get after a single frame of motion and limits your y velocity to like... 1/6th of the normal falling maximum while also reducing it consntalty. That way you wouldn't need to change any player stats and the gimmick wouldn't need to track separate states or anything.  Then it's just a matter of making a way to jump while in the quick sand (basically just copy the ground jump events with the added condition of being in contact with the quicksand). Being in the air will already keep the player from being able to roll too.

  • Like 2
Link to comment
Share on other sites

Well, I have a few more details of what I want to use it for... I want the player to be able to fall through it for secret goodies and the like... So I was wondering if this would change how I should approach it...

Link to comment
Share on other sites

Well, I have a few more details of what I want to use it for... I want the player to be able to fall through it for secret goodies and the like... So I was wondering if this would change how I should approach it...

OK, well, here's how I'd approach it. Use MPB's method of constant Y deceleration (going down) and place a sensor which the player object will touch when Sonic's sprite is no longer visible which will cause the player to lose a life. Just don't use this sensor when you don't want the quicksand to be harmful to players.

Link to comment
Share on other sites

  • 3 weeks later...

ok, thanks InfinityAlex, your suggestion seems to work extremely well, apart from being able to escape the sand. While touching the sensors, sonic can not jump at all... However, with the effect of the sand on sonic, he can still jump, but not when he is touching a sensor... 

 

Any ideas how I could sort this one out?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...