A Line
by rennie moffat · in Torque Game Builder · 03/07/2011 (4:31 pm) · 6 replies
Hi there, I am wondering how one might create a growing line. In that, for instance, say I had a player with a fishing rod, 2D, flat, side scroll like and then he casts his line. The hook, a separate object from the character who cast it, flies thru the air at velocity XY. My question is, how might one create the line, that follows? Is does not need to be fancy with curves (tho that might be nice to know), but a straight line that tethers from the character to as far as the cast goes. Then can be realed back in, disappearing.
About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.
#2
For anyone that uses this, do you think its a good way for this? I did a quick visual test, seems possible.
03/07/2011 (7:21 pm)
Thanks, I will check this out.For anyone that uses this, do you think its a good way for this? I did a quick visual test, seems possible.
#3
03/10/2011 (7:06 am)
Other option is to place, rotate and scale a simple sprite so that it start at the rod and end at the hook.
#4
I have siad it before, and I will say it again, implement Box2D ASAP.
03/10/2011 (7:42 am)
That might be good, but too simple, in a way as it would work for a straight line for sure (kind of - ) but it would not allow any flexibility in terms of fluidity in the appearance of the line. I suppose something like the lines created in Angry Birds, hanging things would be more the right track.I have siad it before, and I will say it again, implement Box2D ASAP.
#5
If physics is important for your next game, find an engine that supports physics. There are many other game engines for the iPhone out there and some of those already have advanced physics built in.
BTW, I'm certain that GG has told you already that Box2D won't be implemented any time soon. Lots of games require features that aren't built in. My current game uses a hex grid, a feature many people would probably like. But I didn't demand that GG implement it for me. I did it myself.
Plus! Anything you add to the engine that isn't built gives you an edge.
03/10/2011 (8:28 am)
The steps to integrate Box2D into iTGB have already been posted: www.garagegames.com/community/forums/viewthread/124597/1#comment-800161If physics is important for your next game, find an engine that supports physics. There are many other game engines for the iPhone out there and some of those already have advanced physics built in.
BTW, I'm certain that GG has told you already that Box2D won't be implemented any time soon. Lots of games require features that aren't built in. My current game uses a hex grid, a feature many people would probably like. But I didn't demand that GG implement it for me. I did it myself.
Plus! Anything you add to the engine that isn't built gives you an edge.
#6
I will figure it out. This was not to meant to be a shot at GG, just a commonality. The line it self, perhaps... well is not dire, just a bonus.
Thanks.
03/10/2011 (8:34 am)
Yes, but my current engine skill are lame. I will figure it out. This was not to meant to be a shot at GG, just a commonality. The line it self, perhaps... well is not dire, just a bonus.
Thanks.
Torque Owner David Helmer
The Kids
I've yet to play around with the object but I figure it must be a good idea to start there. I imagine you can manually create the object in the TGB Editor and then edit it in script to dynamically represent the line.