Swinging ropes in games

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
Joefish
Rick Dangerous
Posts: 2058
Joined: Tue Nov 14, 2017 10:26 am

Re: Swinging ropes in games

Post by Joefish »

Ah, it's not the point positions. It's the offset from the point immediately above. So you start at the top point, then the next point is +0 horizontally, +6 downwards, and so on through the table until you've plotted enough points.

Then if you start a little bit later in the table, so a little offset sneaks in at the bottom, and that works its way up to the top until the whole chain of points is offset to one side or the other.

And since it's a table, a random bit of wobblyness can be added that appears to ripple up then back down the rope near the end of the swing.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Swinging ropes in games

Post by RMartins »

A reference Lookup table would be the obvious choice, for performance concerns.
Jonathan
Drutt
Posts: 11
Joined: Sun Feb 18, 2018 6:55 pm
Contact:

Re: Swinging ropes in games

Post by Jonathan »

Egghead Goes to Town used a big table of coordinates for speed, all pre-calculated in Sinclair BASIC. It was quite expensive but seeing as the screens were very efficiently stored I figured it was affordable.
Not on Twitter, left the Spectrum scene on 4th December 2018. Thanks folks, it was a pleasure knowing you.
http://www.spanglefish.com/egghead/
http://arcadegamedesigner.proboards.com/
https://jonathan-cauldwell.itch.io/
User avatar
R-Tape
Site Admin
Posts: 6402
Joined: Thu Nov 09, 2017 11:46 am

Re: Swinging ropes in games

Post by R-Tape »

Jonathan wrote: Sun Feb 18, 2018 7:02 pm Egghead Goes to Town used a big table of coordinates for speed, all pre-calculated in Sinclair BASIC. It was quite expensive but seeing as the screens were very efficiently stored I figured it was affordable.
There's a flaw somewhere though, you've gone against Spectrum best practise by not having a rope with 75% unfair collision.
Ralf
Rick Dangerous
Posts: 2286
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Swinging ropes in games

Post by Ralf »

Egghead Goes to Town used a big table of coordinates for speed, all pre-calculated in Sinclair BASIC
Wow, calculating data in Spectrum Basic in 2017 is certainly retro :)

Personally when I needed once some precalculated data for my game, I used Excel. Not very cool, I suppose ;)

By the way, welcome to the forums, Jonathan !
Post Reply