Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Smoother jump boost
Started by sdktester15 Aug 08 2018 04:12 PM

3 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

sdktester15

[GLOBAL: userInfoPane.html]
sdktester15
  • Corona Geek

  • 1,195 posts
  • Corona SDK

I am working on mimicking the control system for a game called Super Meat Boy. Right now I am working on the jump. The way the jump works is that you jump higher as you hold down the jump button longer. I feel like I have mimicked this well, but it just seems that half-way through the jump, the jump kind of "boosts" a bit. 

 

What I mean is that it suddenly picks up a bit of speed, and it is not as smooth as I would like it to be.

 

The project is really small, so here are the main and config.lua files:

 

I don't know if any of you have ever played Super Meat Boy, but I am sure you should be able to see the speed boost mid-way through the jump. 

 

 

 

 

 

 

Attached Files



[TOPIC: post.html]
#2

fungrip

[GLOBAL: userInfoPane.html]
fungrip
  • Enthusiast

  • 54 posts
  • Corona SDK

I think one way to do this is to apply linear impulse of a full jump in began, and if the touch ended earlier then a certain value, slows the jump. Not sure if it will mimics SMB jump though(haven't play that in a long while)



[TOPIC: post.html]
#3

sdktester15

[GLOBAL: userInfoPane.html]
sdktester15
  • Corona Geek

  • 1,195 posts
  • Corona SDK

Yeah, I could try that.



[TOPIC: post.html]
#4

sdktester15

[GLOBAL: userInfoPane.html]
sdktester15
  • Corona Geek

  • 1,195 posts
  • Corona SDK

This also seems like a good approach, I'll keep the code I wrote for both in case any problems arise. Thanks!

 

I'm just wondering if there are also other ways to go about this.




[topic_controls]
[/topic_controls]