Fast Rope Physics for bump.lua?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Gunroar:Cannon()
Party member
Posts: 1085
Joined: Thu Dec 10, 2020 1:57 am

Re: Fast Rope Physics for bump.lua?

Post by Gunroar:Cannon() »

pgimeno wrote: Thu Mar 18, 2021 3:14 pm Probably, I haven't checked in much detail. I designed it with Verlet integration in mind, so if you don't use it YMMV.
I tried to run it, but I was having screen issues, and immediately I start something explodes(and I lose a life?). I don't think the ship was in focus. So I can't really use a rope and find it hard to pinpoint the rope code. Could you pinpoint where it is in T2.
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: Fast Rope Physics for bump.lua?

Post by pgimeno »

Maybe you haven't defined custom keys? The default is P to thrust (try pressing it right at the start, otherwise you fall and die), Q and W to turn, and L to pick. Using separate hands for turning and thrusting is recommended if you want to master it :)

The game is about a tractor ship that picks up orbs attached to a cable (rope), one at a time, and places them in a platform in the surface. The orbs have different masses, resulting in different behaviours of the ship depending on the mass.

https://notabug.org/pgimeno/Thrust-II-r ... 9/game.lua

The ship update code covers lines 359-439 inclusive.

The rope length constraint is applied starting at line 411. Cable position means the end of the cable that is not attached to the ship, that is, where the orb should be. In my case, in order to be faithful to the original, the rope is always attached to the rotation point of the ship, and to the centre of the orb.
Post Reply

Who is online

Users browsing this forum: No registered users and 58 guests