- Home /
How would you make a jump like geometry dash/impossible game?
So I am trying to make a geometry dash/impossible game clone as my first unity game. I fixed the movement I believe, but the only problem I am having now is the jump.
I dont know how they get a perfect jump like that? It is like quick and goes up quick and down quick. How could you achieve such a thing?
Here is an example if you want to see how it works: http://impossiblegame.org/the-impossible-game/
If anyone could tell me how you could achieve this I would be very grateful.
Thanks.
How you solve this will depend on how you are moving your character (transform, character, Rigidbody). For example, if you are using the FPS Input Controller, you can just change the jump height and the gravity to get this. Or you can take a look at how gravity is implemented in the CharacterController.$$anonymous$$ove() reference page.
a lot of damping D:
Also, with the impossible game, i dont think the character is actually rotating. I think that is just for effect. You could add an animation over your collider but really just be moving it up like a regular jump.
Answer by bengris32 · Sep 04, 2015 at 02:51 PM
You can use the code i messed with from the coding API
using UnityEngine;
using System.Collections;
public class Move : MonoBehaviour {
public float speed = 6.0F;
public float jumpSpeed = 8.0F;
public float gravity = 20.0F;
private Vector3 moveDirection = Vector3.zero;
void Update() {
CharacterController controller = GetComponent<CharacterController>();
if (controller.isGrounded) {
moveDirection = new Vector3(1, 0, 0);
moveDirection = transform.TransformDirection(moveDirection);
moveDirection *= speed;
if (Input.GetButton("Jump"))
moveDirection.y = jumpSpeed;
}
moveDirection.y -= gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime);
}
}
Hope This Helps!!
Answer by Light997 · Sep 04, 2015 at 01:58 PM
I would try to catapult the cube into the air with the transform.y and then slam it back down again when it hits a certain height or time. You could also just twiddle with the numbers on the Character Controller Script.
But always remember: There is never just one way to solve any programming challenge. There are possibly even better ways out there, but the more control you want to have over your jump and the more you want to fine-tune it, the more complex the code gets. Be careful not to get caught up, but don't just put the problem aside either, because jumping is the base mechanic of The Impossible Game. If your base mechanic sucks, the whole game will suffer tremendously.
I've seen quite a few puzzle games that depended entirely on how skillful you could work the mechanics fall completly flat because the mechanics were random or just entirely unmanageable. If you have a skill-based game in which one of the mechanics doesn't work or feel right, chuck it. Don't be like other developers who then release it for $4.99 and tell everyone who can't do it that they're just too bad at the game.
Went off on a tangent a little there. Hope I could help :)
Answer by darksouls3fans · Jun 18, 2016 at 05:46 AM
Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share. dark souls 3 emoji
Answer by PointyPigheadGames · May 26, 2017 at 01:10 PM
https://www.youtube.com/watch?v=wHXpsFQhtGQ&feature=youtu.be
I have made a tutorial here on how to do this.