How to not instantly turn?

Context: I’m making a sonic parody game with snick sprites. (Snick is a parody of sonic from the pizza tower SAGE 2019 DEMO, that’s where I got the sprites from, all pixel art credit for snick goes to them.) However I have a problem, when I’m going fast and I change direction, snick instantly turns, but in the SAGE 2019 DEMO snick has to slow down before he can turn. How can I make it so he doesn’t instantly turn and has to slow down. My game link is here if anyone needs it: Flowlab Game Creator - Snick Game Lol

I think I can fix this with the interpolation bundle. Let me look a sec.

Here is a new run and jump bundle I made. It uses interpolation to slow down gradually. All values can be adjusted. Credits to JR01 and PixelPizza for the bundle. This contains all of your player code, not just the run and jump. (Hope this works! :+1:)

{"data":{"behavior":{"v":"2","nodes":[{"inputCount":0,"outputCount":0,"name":"Run & Jump","behaviorType":"logic.NodeGroup","x":-450,"y":-256,"group":0,"id":"bfeb5e4bf46ac94c","notes":null,"n_o":0,"isMenuItem":false},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":-32,"group":"c4c2c1c00079404f","id":"c4c2c1c14fe95549","startVal":-15,"tag":"move left"},{"inputCount":3,"outputCount":3,"name":"Velocity","behaviorType":"logic.properties.Physics","x":1080,"y":48,"group":"c4c2c1c00079404f","id":"c4c2c1c12f15064d"},{"inputCount":3,"outputCount":3,"name":"Flip","behaviorType":"logic.properties.Flip","x":360,"y":-32,"group":"c4c2c1c00079404f","id":"c4c2c1c103006444","vertical":false},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":96,"group":"c4c2c1c00079404f","id":"c4c2c1c19b008f43","startVal":15,"tag":"move right"},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":0,"y":96,"group":"c4c2c1c00079404f","id":"c4c2c1c1475dc34c","keyCode":39,"repeats":true,"delay":0},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":0,"y":-32,"group":"c4c2c1c00079404f","id":"c4c2c1c2c21fc641","keyCode":37,"repeats":true,"delay":0},{"inputCount":3,"outputCount":1,"name":"Object Variable","behaviorType":"logic.properties.CustomProperty","x":360,"y":80,"group":"c4c2c1c00079404f","id":"c4c2c1c20b9eac42","tag":"X Velocity:Number"},{"inputCount":0,"outputCount":1,"name":"Always","behaviorType":"logic.triggers.Always","x":540,"y":96,"group":"c4c2c1c00079404f","id":"c4c2c1c2f55d9c45"},{"inputCount":3,"outputCount":1,"name":"Object Variable","behaviorType":"logic.properties.CustomProperty","x":720,"y":80,"group":"c4c2c1c00079404f","id":"c4c2c1c2437ae847","tag":"X Velocity:Number"},{"expression":"A+(B-A)*(C/100)","default0":0,"default1":0,"default2":15,"default3":0,"default4":0,"default5":0,"params":3,"version":2,"tag":"","inputCount":4,"outputCount":1,"name":"Expression","behaviorType":"logic.logic.Expression","x":0,"y":-32,"group":"c4c2c1c76a180b47","id":"c4c2c1c5f3819648","notes":"'C' sets the Interpolation Speed (in %)","n_o":1},{"inputCount":0,"outputCount":1,"name":"Once","behaviorType":"logic.triggers.Once","x":-360,"y":-128,"group":"c4c2c1c76a180b47","id":"c4c2c1c56c693c47","resetOnLevelStart":false},{"inputCount":1,"outputCount":1,"name":"Extractor","behaviorType":"logic.properties.Extractor","x":-180,"y":-128,"group":"c4c2c1c76a180b47","id":"c4c2c1c56b304c4e","notes":"Set to the value you want to Interpolate","n_o":1,"targetId":0,"prop":"x"},{"inputCount":0,"outputCount":1,"name":"Bundle Input","behaviorType":"logic.NodeGroupInput","x":-180,"y":0,"group":"c4c2c1c76a180b47","id":"c4c2c1c507068d47","portId":"c4c2c1c76a180b47i0","tag":"speed","dataType":2},{"inputCount":0,"outputCount":1,"name":"Bundle Input","behaviorType":"logic.NodeGroupInput","x":-360,"y":192,"group":"c4c2c1c76a180b47","id":"c4c2c1c623b98f49","portId":"c4c2c1c76a180b47i1","tag":"in","dataType":2},{"inputCount":1,"outputCount":0,"name":"Bundle Output","behaviorType":"logic.NodeGroupOutput","x":180,"y":-32,"group":"c4c2c1c76a180b47","id":"c4c2c1c67252944a","portId":"c4c2c1c76a180b47o0","tag":"out","dataType":2},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":-180,"y":96,"group":"c4c2c1c76a180b47","id":"c4c2c1c673ec624c","_startVal":0,"dataType":2},{"gateVal":0,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":360,"y":192,"group":"c4c2c1c76a180b47","id":"c4c2c1c64cfb9345"},{"inputCount":1,"outputCount":0,"name":"Bundle Output","behaviorType":"logic.NodeGroupOutput","x":540,"y":192,"group":"c4c2c1c76a180b47","id":"c4c2c1c66b51a44b","portId":"c4c2c1c76a180b47o1","tag":"done","dataType":2},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":96,"group":"c4c2c1c76a180b47","id":"c4c2c1c6cdb84047","startVal":0,"tag":"Result","roundMode":2},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":-180,"y":192,"group":"c4c2c1c76a180b47","id":"c4c2c1c632ea104d","startVal":0,"tag":"To","roundMode":2},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":-360,"y":-32,"group":"c4c2c1c76a180b47","id":"c4c2c1c6aed75947","_startVal":0,"dataType":2},{"inputCount":2,"outputCount":1,"name":"Logic Gate","behaviorType":"logic.logic.Gate","x":-540,"y":-32,"group":"c4c2c1c76a180b47","id":"c4c2c1c72d2b514d","gateType":"NOR"},{"delay":0,"count":10,"version":2,"inputCount":3,"outputCount":1,"name":"Timer","behaviorType":"logic.triggers.Timer","x":-720,"y":-32,"group":"c4c2c1c76a180b47","id":"c4c2c1c7cec1f74c"},{"inputCount":2,"outputCount":2,"name":"v4 Interpolation","behaviorType":"logic.NodeGroup","x":900,"y":48,"group":"c4c2c1c00079404f","id":"c4c2c1c76a180b47","notes":"Bundle by JR01 & PixelPizza.\r\n- speed: Speed (in %)\r\n- in: Target result\r\n\r\n- out: Result\r\n- done: reached the Target Value","n_o":0,"isMenuItem":false},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":720,"y":-16,"group":"c4c2c1c00079404f","id":"c4c2c1c77f5a5042","startVal":10,"tag":"","roundMode":1},{"inputCount":0,"outputCount":1,"name":"Once","behaviorType":"logic.triggers.Once","x":540,"y":16,"group":"c4c2c1c00079404f","id":"c4c2c1c779504e43","resetOnLevelStart":false},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":-128,"group":"c4c2c1c00079404f","id":"c4c2c1c77884e945","startVal":0,"roundMode":1},{"inputCount":0,"outputCount":1,"name":"Always","behaviorType":"logic.triggers.Always","x":-360,"y":-176,"group":"c4c2c1c00079404f","id":"c4c735c57fb74546"},{"inputCount":3,"outputCount":1,"name":"Object Variable","behaviorType":"logic.properties.CustomProperty","x":-180,"y":-192,"group":"c4c2c1c00079404f","id":"c4c74ac7e9167948","tag":"X Speed:Number"},{"expression":"A*-1","default0":0,"default1":0,"default2":0,"default3":0,"default4":0,"default5":0,"params":1,"version":2,"tag":"","inputCount":2,"outputCount":1,"name":"Expression","behaviorType":"logic.logic.Expression","x":0,"y":-144,"group":"c4c2c1c00079404f","id":"c4c776e0ea4a964d"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":0,"y":-240,"group":"c4c2c1c00079404f","id":"c4c7be0d38346449","startVal":0,"tag":"Speed","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":-360,"y":-272,"group":"c4c2c1c00079404f","id":"c4c8210b15e2dc4b","startVal":15,"tag":"","roundMode":1},{"inputCount":0,"outputCount":1,"name":"Once","behaviorType":"logic.triggers.Once","x":-540,"y":-256,"group":"c4c2c1c00079404f","id":"c4c83aa251757942","resetOnLevelStart":false},{"inputCount":0,"outputCount":0,"name":"Run & Jump","behaviorType":"logic.NodeGroup","x":0,"y":-176,"group":"bfeb5e4bf46ac94c","id":"c4c2c1c00079404f","notes":null,"n_o":0,"isMenuItem":false},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":0,"y":-480,"group":"c4c4dd39c732f048","id":"c030f2ee66c86546","keyCode":37,"repeats":true,"delay":0},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":0,"y":-384,"group":"c4c4dd39c732f048","id":"c031104106a39a40","keyCode":39,"repeats":true,"delay":0},{"inputCount":3,"outputCount":3,"name":"Animation","behaviorType":"logic.properties.Animation","x":360,"y":-496,"group":"c4c4dd39c732f048","id":"c039b8ef2aa17c4c","animationName":"run","loop":true,"priority":2},{"inputCount":3,"outputCount":3,"name":"Animation","behaviorType":"logic.properties.Animation","x":360,"y":-384,"group":"c4c4dd39c732f048","id":"c0491ef5119d5143","animationName":"run (Mach 2)","loop":true,"priority":1},{"delay":15,"count":1,"version":2,"inputCount":3,"outputCount":1,"name":"Timer","behaviorType":"logic.triggers.Timer","x":180,"y":-400,"group":"c4c4dd39c732f048","id":"c04c252d96cdb946"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":360,"y":-272,"group":"c4c4dd39c732f048","id":"c4c899adc3f8c74a","startVal":20,"tag":"","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":540,"y":-384,"group":"c4c4dd39c732f048","id":"c4c8a8173775ee4b","startVal":0,"roundMode":1},{"inputCount":3,"outputCount":1,"name":"Object Variable","behaviorType":"logic.properties.CustomProperty","x":810,"y":-272,"group":"c4c4dd39c732f048","id":"c4c8c436eae5be43","tag":"X Speed:Number"},{"inputCount":0,"outputCount":0,"name":"Play Animations","behaviorType":"logic.NodeGroup","x":0,"y":-256,"group":"bfeb5e4bf46ac94c","id":"c4c4dd39c732f048","isMenuItem":false},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":0,"y":416,"group":"c4c525e0dfef8642","id":"bfeb5e4dbdd4564a","keyCode":38,"repeats":false,"delay":0},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":270,"y":384,"group":"c4c525e0dfef8642","id":"bfeb5e4e4a9ea743","startVal":45,"tag":"jump force"},{"inputCount":0,"outputCount":1,"name":"Collision","behaviorType":"logic.triggers.Collision","x":270,"y":288,"group":"c4c525e0dfef8642","id":"bfeb5e4e900c7d43","targetClassId":0,"targetEntityId":0,"collisionFilter":15,"collideWithEntity":false},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":540,"y":352,"group":"c4c525e0dfef8642","id":"bfeb5e4f7ac7bf47","_startVal":0,"dataType":2},{"inputCount":3,"outputCount":3,"name":"Impulse","behaviorType":"logic.components.Impulse","x":720,"y":352,"group":"c4c525e0dfef8642","id":"bfeb5e50f2012f42"},{"inputCount":3,"outputCount":3,"name":"Animation","behaviorType":"logic.properties.Animation","x":270,"y":464,"group":"c4c525e0dfef8642","id":"c0bce4e6829e6946","animationName":"jump","loop":true,"priority":1},{"inputCount":0,"outputCount":1,"name":"Collision","behaviorType":"logic.triggers.Collision","x":90,"y":512,"group":"c4c525e0dfef8642","id":"c0bf9caeffe21a44","targetClassId":0,"targetEntityId":0,"collisionFilter":2,"collideWithEntity":false,"delay":0},{"inputCount":0,"outputCount":0,"name":"Jump","behaviorType":"logic.NodeGroup","x":0,"y":-96,"group":"bfeb5e4bf46ac94c","id":"c4c525e0dfef8642","isMenuItem":false},{"inputCount":5,"outputCount":5,"name":"Camera","behaviorType":"logic.components.View","x":-360,"y":-144,"group":"c4c557d3d3ba3141","id":"c021f1a5f007094b","parallax":100,"scrollX":true,"scrollY":true,"minLeft":0,"maxRight":45,"top":0,"bottom":11,"infX":false,"infY":false},{"inputCount":0,"outputCount":1,"name":"Always","behaviorType":"logic.triggers.Always","x":-360,"y":-256,"group":"c4c557d3d3ba3141","id":"c0b5ad5df5c1c54c"},{"inputCount":3,"outputCount":3,"name":"Animation","behaviorType":"logic.properties.Animation","x":-180,"y":-256,"group":"c4c557d3d3ba3141","id":"c0b5fa7dee972140","animationName":"idle","loop":true,"priority":0},{"inputCount":0,"outputCount":0,"name":"Misc","behaviorType":"logic.NodeGroup","x":0,"y":-16,"group":"bfeb5e4bf46ac94c","id":"c4c557d3d3ba3141","isMenuItem":false}],"links":[{"input_id":"c4c2c1c103006444i0","output_id":"c4c2c1c14fe95549o0"},{"input_id":"c4c2c1c20b9eac42i0","output_id":"c4c2c1c14fe95549o0"},{"input_id":"c4c2c1c103006444i1","output_id":"c4c2c1c19b008f43o0"},{"input_id":"c4c2c1c20b9eac42i0","output_id":"c4c2c1c19b008f43o0"},{"input_id":"c4c2c1c19b008f43i1","output_id":"c4c2c1c1475dc34co0"},{"input_id":"c4c2c1c77884e945i1","output_id":"c4c2c1c1475dc34co1"},{"input_id":"c4c2c1c14fe95549i1","output_id":"c4c2c1c2c21fc641o0"},{"input_id":"c4c2c1c77884e945i1","output_id":"c4c2c1c2c21fc641o1"},{"input_id":"c4c2c1c2437ae847i1","output_id":"c4c2c1c2f55d9c45o0"},{"input_id":"c4c2c1c76a180b47i1","output_id":"c4c2c1c2437ae847o0"},{"input_id":"c4c2c1c5f3819648i0","output_id":"c4c2c1c5f3819648o0"},{"input_id":"c4c2c1c67252944ai0","output_id":"c4c2c1c5f3819648o0"},{"input_id":"c4c2c1c6cdb84047i0","output_id":"c4c2c1c5f3819648o0"},{"input_id":"c4c2c1c6cdb84047i1","output_id":"c4c2c1c5f3819648o0"},{"input_id":"c4c2c1c56b304c4ei0","output_id":"c4c2c1c56c693c47o0"},{"input_id":"c4c2c1c5f3819648i0","output_id":"c4c2c1c56b304c4eo0"},{"input_id":"c4c2c1c673ec624ci1","output_id":"c4c2c1c56b304c4eo0"},{"input_id":"c4c2c1c5f3819648i2","output_id":"c4c2c1c507068d47o0"},{"input_id":"c4c2c1c7cec1f74ci0","output_id":"c4c2c1c623b98f49o0"},{"input_id":"c4c2c1c6aed75947i2","output_id":"c4c2c1c623b98f49o0"},{"input_id":"c4c2c1c673ec624ci2","output_id":"c4c2c1c623b98f49o0"},{"input_id":"c4c2c1c632ea104di0","output_id":"c4c2c1c623b98f49o0"},{"input_id":"c4c2c1c632ea104di1","output_id":"c4c2c1c623b98f49o0"},{"input_id":"c4c2c1c5f3819648i1","output_id":"c4c2c1c673ec624co0"},{"input_id":"c4c2c1c5f3819648i3","output_id":"c4c2c1c673ec624co0"},{"input_id":"c4c2c1c66b51a44bi0","output_id":"c4c2c1c64cfb9345o0"},{"input_id":"c4c2c1c64cfb9345i1","output_id":"c4c2c1c6cdb84047o0"},{"input_id":"c4c2c1c64cfb9345i0","output_id":"c4c2c1c632ea104do0"},{"input_id":"c4c2c1c56b304c4ei0","output_id":"c4c2c1c6aed75947o0"},{"input_id":"c4c2c1c6aed75947i0","output_id":"c4c2c1c6aed75947o0"},{"input_id":"c4c2c1c6aed75947i1","output_id":"c4c2c1c72d2b514do0"},{"input_id":"c4c2c1c72d2b514di0","output_id":"c4c2c1c7cec1f74co0"},{"input_id":"c4c2c1c12f15064di0","output_id":"c4c2c1c76a180b47o0"},{"input_id":"c4c2c1c76a180b47i0","output_id":"c4c2c1c77f5a5042o0"},{"input_id":"c4c2c1c77f5a5042i1","output_id":"c4c2c1c779504e43o0"},{"input_id":"c4c2c1c20b9eac42i0","output_id":"c4c2c1c77884e945o0"},{"input_id":"c4c74ac7e9167948i1","output_id":"c4c735c57fb74546o0"},{"input_id":"c4c7be0d38346449i0","output_id":"c4c74ac7e9167948o0"},{"input_id":"c4c7be0d38346449i1","output_id":"c4c74ac7e9167948o0"},{"input_id":"c4c776e0ea4a964di0","output_id":"c4c74ac7e9167948o0"},{"input_id":"c4c776e0ea4a964di1","output_id":"c4c74ac7e9167948o0"},{"input_id":"c4c2c1c14fe95549i0","output_id":"c4c776e0ea4a964do0"},{"input_id":"c4c2c1c19b008f43i0","output_id":"c4c7be0d38346449o0"},{"input_id":"c4c74ac7e9167948i0","output_id":"c4c8210b15e2dc4bo0"},{"input_id":"c4c8210b15e2dc4bi1","output_id":"c4c83aa251757942o0"},{"input_id":"c04c252d96cdb946i0","output_id":"c030f2ee66c86546o0"},{"input_id":"c0491ef5119d5143i0","output_id":"c030f2ee66c86546o0"},{"input_id":"c039b8ef2aa17c4ci1","output_id":"c030f2ee66c86546o1"},{"input_id":"c04c252d96cdb946i1","output_id":"c030f2ee66c86546o1"},{"input_id":"c0491ef5119d5143i1","output_id":"c030f2ee66c86546o1"},{"input_id":"c04c252d96cdb946i0","output_id":"c031104106a39a40o0"},{"input_id":"c0491ef5119d5143i0","output_id":"c031104106a39a40o0"},{"input_id":"c039b8ef2aa17c4ci1","output_id":"c031104106a39a40o1"},{"input_id":"c04c252d96cdb946i1","output_id":"c031104106a39a40o1"},{"input_id":"c0491ef5119d5143i1","output_id":"c031104106a39a40o1"},{"input_id":"c4c8a8173775ee4bi1","output_id":"c0491ef5119d5143o1"},{"input_id":"c039b8ef2aa17c4ci0","output_id":"c04c252d96cdb946o0"},{"input_id":"c4c899adc3f8c74ai1","output_id":"c04c252d96cdb946o0"},{"input_id":"c4c8c436eae5be43i0","output_id":"c4c899adc3f8c74ao0"},{"input_id":"c4c8c436eae5be43i0","output_id":"c4c8a8173775ee4bo0"},{"input_id":"bfeb5e4e4a9ea743i1","output_id":"bfeb5e4dbdd4564ao0"},{"input_id":"c0bce4e6829e6946i0","output_id":"bfeb5e4dbdd4564ao0"},{"input_id":"bfeb5e4f7ac7bf47i2","output_id":"bfeb5e4e4a9ea743o0"},{"input_id":"bfeb5e4f7ac7bf47i1","output_id":"bfeb5e4e900c7d43o0"},{"input_id":"bfeb5e4f7ac7bf47i0","output_id":"bfeb5e4f7ac7bf47o0"},{"input_id":"bfeb5e50f2012f42i1","output_id":"bfeb5e4f7ac7bf47o0"},{"input_id":"c0bce4e6829e6946i1","output_id":"c0bf9caeffe21a44o0"},{"input_id":"c0b5fa7dee972140i0","output_id":"c0b5ad5df5c1c54co0"}]}}}

Edit; I made it so he runs faster when he turns into mach 2.

2 Likes

Okay thank you so much, I appreciate your help! :slight_smile:

1 Like

No problem! Let me know if you encounter any bugs with it!

Everything seems to be working fine, however there is a bug at the start where he gets launched a bit forward. Is there a fix to that?

1 Like

Oh, maybe add a timer before the velocity that turns a switch on in 1 second?

I figured out how to fix it, I simply forgot to change a setting. You can fix it by going into the interpolation bundle, and setting the extractor to x velocity, not x position. :+1:

this sounds like a good game!

3 Likes

Okay everything works! Thank you so much for the help!

2 Likes

No problem! If you need any other help, just ping me!

2 Likes

I really hope so! I’ll use this as encouragement :slight_smile:

2 Likes

I think it will turn out to be a great game! Keep on working!

2 Likes