I am trying to make a game like stick-man hook. It is a game where you move around a map, but you can only move if you are next to a crcle thingy, and then you grab on with your grapple hook, and then you can swing left and right.
I am using @BLADEr soft body extension, link here: https://bladebaillio.github.io/soft-body-extension/
I think I get how to make it, but I need a little help with the extension and the gravity to go with it. Can someone help me? If you want to try stick-man hook, the link is here:https://stickmanhookgame.org/ (It might be blocked on school Chromebooks)
I want to make it so the rope will stay the same length, not bend, and create when you press A and destroy when A is released.
This isn’t a game you want the soft body extension for. What you need to be doing is drawing a line from the player to the hang spot, and handling the rest with math. You can draw a line on the background image or use the Sprite Util extension to draw to a different layer of the screen. I think how I would do this is by finding the nearest hold point, finding the distance to that point, and then use some triangle math to keep the player that one distance from the point. This is a lot of math, and it’s not easy. Depending on what grade of math you are in, it may be too complicated, but I bet you could figure it out. Good luck!
I think using the place my sprite distance from could be good… I was actually thinking about this yesterday. I pride myself on being good at maths, but we haven’t learned trigonometry yet. Maybe I will just Khan academy it…
I might need help. I am only in algebra, and I am not that good at it! (Wait, did I just give away my age?)
I can help. i just got done with geometry so I have no idea either
I don’t think that gives away your age. You’ll want to look up The Pythagorean Theorem (a^2 + b^2 = c^2) which is the distance formula you’ll need. You will also need some understanding of gravity and how it interacts with swinging objects, namely how the gravity will translate into horizontal movement. You could also just fudge the numbers until it looks relatively correct.
caught you
Recently got back from camping. That sounds like a cool project and yeah, you might need a better extension for this kind of problem if you don’t want the springiness. Using the “place my sprite distance” will help like @BotWarrior said.
I am down and willing to help! And make a new extension if needed.
I made this so far, I just need to add gravity and the line drawing.
how would I draw a line?
I was playing around with how to draw the line and I made a mini soft body extension.
I made a quick example of how the gravity and line drawing might look:
Press A to attach rope from player to the block
I can turn that line-canvas toolbox into an extension if you need.
Cool! This as an extension would be amazing.
Here’s the extension:
I may end up adding like one or two more blocks, but this is basically it. It creates a sprite between two other sprites and gets the width and height of the x and y distances of the two sprites. And draws a line between them.
Let me know if you need an example of how to use it.