file Removing Acceleration

  • Buzzmusic
  • Buzzmusic's Avatar Topic Author
  • Offline
  • Developer
  • Developer
  • I make levels and songs.
More
30 Oct 2013 00:15 #1 by Buzzmusic
Removing Acceleration was created by Buzzmusic
I recently discovered this thread: www.marbleblast.proboards.com/ind....lay&thread=3238

I played around with a lot of the codes because I was looking for something specific. I was trying to find a way to make it so that when W, A, S, or D is hit, the marble rolls, but immediately stops right when the key is lifted. I was also curious to find something that makes it so that when a key is hit, the marble would roll at a constant pace rather than starting slowly and then gaining more and more speed.
In other words, the code in mind is one that could make the marble roll at a constant pace, and not move unless a key is being held down. This includes the times when the marble is in the air, and I hope it works with Big Marble 1 because that's how the level's going to be.
If there's a code for this, please tell me.

All posts from my account that were made before July 29 2013 are from the point of view of my dad unless it states otherwise.

Please Log in or Create an account to join the conversation.

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
30 Oct 2013 05:06 #2 by Jeff
Replied by Jeff on topic Removing Acceleration
I'm not sure if the physics allows it. However, don't quote me on that, I might be able to find you a way.

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.

Please Log in or Create an account to join the conversation.

  • IsraeliRD
  • IsraeliRD's Avatar
  • Offline
  • Project Manager
  • Project Manager
  • Dragon Power Supreme
More
30 Oct 2013 05:26 #3 by IsraeliRD
Replied by IsraeliRD on topic Removing Acceleration
Well, it would be possible by detecting key input and if none are pressed, just ApplyImpulse 0 0 0 (which would automatically stop the marble). Now from what I know you can have the marble momentum kept for one direction, and stopped on another, so basically say 0 0 0 = FB LR UD (forwards/backwards, left/right, up/down).
This way if one stops pressing FB but is still LR then his marble would move LR and any FB momentum stopped.

Regarding constant pace you'd have to set ApplyImpulse at the speed you want and at the same time you'd have to set the movement keys to that same speed so that you don't have acceleration (but linear movement).

Now because a marble is mid-air, you can grab the current vel value and apply it to the UD part and set the other two to 0.

This is rather hackish, trigger-based and may take a few hours of work, but AFAIK would be possible.

"matan, now i get what you meant a few years back when you said that "the level in mbg is beyond me" after the last rampage i noticed things were insane, and now i truly feel that too" - Dushine, 2015.

Please Log in or Create an account to join the conversation.

  • Buzzmusic
  • Buzzmusic's Avatar Topic Author
  • Offline
  • Developer
  • Developer
  • I make levels and songs.
More
30 Oct 2013 06:23 #4 by Buzzmusic
Replied by Buzzmusic on topic Removing Acceleration
Thanks for the help, Matan. To be honest, the constant pace is not the top-priority, so if it's as hard as it sounds, I could settle for the immediate stops alone. What kind of thing would I put the code in? Would it be the .mis file or some sort of custom trigger (since you said it might be trigger-based)?

All posts from my account that were made before July 29 2013 are from the point of view of my dad unless it states otherwise.

Please Log in or Create an account to join the conversation.

  • IsraeliRD
  • IsraeliRD's Avatar
  • Offline
  • Project Manager
  • Project Manager
  • Dragon Power Supreme
More
30 Oct 2013 07:13 #5 by IsraeliRD
Replied by IsraeliRD on topic Removing Acceleration
Trigger based with the command of ApplyImpulse(0,0,0); (note that code is completely wrong, get someone else to tell you how to do this proper). This will halt the marble instantly and then you can use whatever direction key you want to move it again.

Note that if the third number is 0 then it stops the marble in mid-air, literally, where next thing is gravity taking over again so the marble starts constantly accelerating downwards again.

"matan, now i get what you meant a few years back when you said that "the level in mbg is beyond me" after the last rampage i noticed things were insane, and now i truly feel that too" - Dushine, 2015.

Please Log in or Create an account to join the conversation.

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
30 Oct 2013 22:00 #6 by Jeff
Replied by Jeff on topic Removing Acceleration
matan:

applyIMpulse is not setvelocity, that just adds velocity, so it wont stop.

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.

Please Log in or Create an account to join the conversation.

Moderators: Kalle29AayrlRegislian