I am making this desmos game, and I don’t know how to script movement. It is a low graphics climbing game. I don’t know if I should change the mountain. I want the mountain to be infinite. I have a ok mountain, but I’m unsure if I need to change it. Could someone help?
Basically, store the player’s x and y as variables or a list:
x = 0
y = 0
Then define a polygon, with these values:
polygon((x, y), (x+1,y), (x+1,y+1), (x,y+1))
Then, create actions that can update x and y.
R_ight = x -> x + 1
L_eft = x -> x - 1
U_p = y -> y + 1
D_own = y -> y - 1
To create collision, you can use AABB collision (easiest), or you can make the mountain into an entity or something to check collision from a perspective of the player or mountain.
i was going to say this ![]()
It keeps saying that it can’t update x AND it wont let me make the polygon.
Send the graph, also this is not a platformer but might teach a thing or two: BrainFK in Desmos | Desmos
Ok. I need some help figuring out how I can create collision (I probably will use AABB) and gravity. By the way, how does the motion work? and here is the Geometry Graph, in case you were wanting to see what I have. Also, how do I get the viewport to follow the player?
Well, since its a complex curve, you can’t jump the player by steps of 1. Also, gravity is just accelerating but downwards.
Check if the player is anywhere between +/- 0.1 of the mountain, and if they are, they are on the ground.
Basically, acceleration is like this:
x -> x + x * dt * friction
where dt is time
I think
What should I set time to? Also, should I change the mountain?
Uh okay, it’s gotten kind of complex, so I decided to spend around 8 hours over 2 days to cook this up (unfinished, but is a pretty good tutorial: Desmos | Desmos | Notebook)
It will explain everything, and will create a pretty cool platformer. Sorry, it’s not a mountain climber, because I really don’t know how I can create good collision for a curve. And it’s hard to create complex colliders in Desmos since all you got is polygon.
It doesnt have to be a curve, it just has to be infinite. I don’t care about the shape, as long as it doesn’t get TOO crazy.
8 hours
bro is determined
Ya
anyways @zer0 did you check the note book out?
Checking it out right now!
I did, you put lots of effort into it. Nice job!!!
Thanks man!!! Appreciate it, since I did spend a long time working with this