The Daily Click ::. Forums ::. Klik Coding Help ::. That Ninja rope...
 

Post Reply  Post Oekaki 
 

Posted By Message

en kerro



Registered
  21/10/2004
Points
  578
30th December, 2005 at 07:14:09 -

Could someone post an example of worms-type ninja rope..? I tried myself, but it was a miserable failure! Please... does anyone know how to make it?

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
31st December, 2005 at 02:50:14 -

sadly i dont but i know its a complex calculation using geomitry etc. Have you tried doing a search?

 
n/a

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
31st December, 2005 at 18:54:45 -

There is a swing object you could use if you have mmf. If not you'll have to code it yourself using trigonometry. You could also use the drawline extension to do the actual rope.

 
n/a

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
31st December, 2005 at 18:56:12 -

Drawline's pretty buggy. Maybe stretching an Alpha Channel Object would work better?

 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
31st December, 2005 at 19:50:57 -

Or the overlay object? It can draw linez.

 
n/a

en kerro



Registered
  21/10/2004
Points
  578
31st December, 2005 at 23:05:33 -

I use TGF... and I don't know how to use those extensions or trigonometry.. If someone knows the code how to make it, or has an example, please post it to me...

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
1st January, 2006 at 12:19:34 -

Lol I knew someone was going to say drawline is buggy Overlay should do fine for that

 
n/a

Nothing, Ok?



Registered
  14/05/2004
Points
  199
1st January, 2006 at 14:36:12 -

Ask your mathteacher. They like if you like math.

 
Is Nothing, Ok?

http://www.ohwriters.com/

http://www.ohwriters.com/

en kerro



Registered
  21/10/2004
Points
  578
1st January, 2006 at 16:35:10 -

I'm not going to ask my math teacher for this!!

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

ben mercer

Possibly Insane

Registered
  11/07/2004
Points
  2538
1st January, 2006 at 17:56:07 -

you need objects

player
rope source

(and the advanced direction extension object)

you need values

angvel
angle
length
gravity
player speed

when the player first uses the rope
-set angle to angle between player and rope source
-set angvel to 0

always
-set angvel to angvel + gravity * cos(angvel)
-set angle to angle + angvel
-set x position of player to x(rope source)+cos(angle)*length
-set y position of player to y(rope source)+sin(angle)*length

collision between player and a backdrop
-set angvel to angvel*-1

Right arrow pressed
-set angvel to angvel + player speed * sin(angvel)

Left arrow pressed
-set angvel to angvel - player speed * sin(angvel)

I should think that will work, i didn't try it, but mess it about and it should work at some point.





 
Stuckboy

JC Denton: "I know your UNATCO killphrase: Laputan Machine."
Gunther Hermann: "I - am - not - a - machi --"
JC Denton: "Sticks and stones..."

Nuutti



Registered
  26/10/2003
Points
  1364
1st January, 2006 at 18:11:31 -

That should work somehow, but then what when the rope collides with ground and needs to be bended :S I cant help anyway, sorry.

 
P.S. sorry for my mangled english.

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
1st January, 2006 at 18:49:45 -

wtf i think Phizzi shud maek a extendjun for this lol k

 
n/a

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
1st January, 2006 at 20:28:29 -

Ben mercer, you really make it sound easy. I've been working on a ninja rope for a couple of weeks and it sure is a bitch. Especially the collision part acutally, but I almost got it now.
BTW, it's actually
always -> set angvel to angvel - sin(angle)/length, the gravity variable is not needed since it's a constant. The rest is correct I think.

Oh, and if you're using TGF, Perttu Tuovinen, you might as well give up. Working with geometry in TGF plain stinks, the advanced math object is really buggy, and I don't think there are other objects that can do adv. math very well.

 
This space is for rent

en kerro



Registered
  21/10/2004
Points
  578
2nd January, 2006 at 13:44:05 -

I use TGF. And I just have to try that
because I want ninja rope for my game...

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

en kerro



Registered
  21/10/2004
Points
  578
2nd January, 2006 at 15:31:25 -

I use TGF =>no advanced direction object for me. What shall I use?

+How to do this: set angle to angle between player and rope source

Image Edited by the Author.

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

en kerro



Registered
  21/10/2004
Points
  578
2nd January, 2006 at 16:42:54 -

Thanks, I'll try my best

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

en kerro



Registered
  21/10/2004
Points
  578
2nd January, 2006 at 16:53:45 -

decimals didn't work in pi... I just put there number 3... and before and after that, rope doesn't work, it just teleports player to another place...

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
2nd January, 2006 at 17:17:13 -

I'm telling you, it sucks using trig in TGF. Out of curiosity, I tried to reproduce my ninja rope engine in TGF. (And I finally found out how to get around those damn bugs in the adv. match object ). Link: http://www.megaupload.com/?d=VEOJJF9U, (wish I could remember the password my webspace T_T, you'll have to do it with megaupload). It's only the pendulum movement, if you want to work on it, go ahead. You'll notice the movement is a bit buggy, that's because TGF can't work with decimals.

 
This space is for rent

en kerro



Registered
  21/10/2004
Points
  578
2nd January, 2006 at 17:25:22 -

Link won't work...

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
2nd January, 2006 at 17:36:08 -

WTF, stupid megaupload. Here's another: http://rapidshare.de/files/10266485/Pendulum.zip.html
Sorry, I really need to find a new webspace.

 
This space is for rent

en kerro



Registered
  21/10/2004
Points
  578
2nd January, 2006 at 18:18:45 -

It really works, Hernan, but if I use it in my game, it messes up with background collisions and it goes crappy... but that really is what that ninja rope has to be.

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%
   

Post Reply



 



Advertisement

Worth A Click