Vector Graphics
by Ricky Taylor · in Torque Game Builder · 05/19/2005 (12:26 am) · 7 replies
Bough T2D last night. Read through the first tutorial and thought this:
Does T2D have any support for vector graphics, Ive had a look at the fxSpriteStatic2D and its just a texture rendered at a position, yah?
Eventually I'd like to make a game where there are green squares, circles, and other shapes, reacting to physics for no apparent reason :).
Does T2D have any support for vector graphics, Ive had a look at the fxSpriteStatic2D and its just a texture rendered at a position, yah?
Eventually I'd like to make a game where there are green squares, circles, and other shapes, reacting to physics for no apparent reason :).
#2
I'm using modified versions of Han's beam code for the "tempest" specific graphics, which works pretty well for lines and squares and such. Circles would be more of a pain.
05/19/2005 (7:38 am)
You mean kinda like this: cathodetan.blogspot.com/2005/05/dev-day-diary-gettin-purty.html ?I'm using modified versions of Han's beam code for the "tempest" specific graphics, which works pretty well for lines and squares and such. Circles would be more of a pain.
#3
EDIT: I forgot we have google now :->
For anyone else interested, the link for the above mentioned beam code is this:
www.garagegames.com/mg/forums/result.thread.php?qt=28671
Code was posted by Hans Sjunnesson.
Cheers,
Martin
05/19/2005 (12:08 pm)
Hey Joshua, that looks pretty cool. What's the "Hans beam code" you mentioned?.EDIT: I forgot we have google now :->
For anyone else interested, the link for the above mentioned beam code is this:
www.garagegames.com/mg/forums/result.thread.php?qt=28671
Code was posted by Hans Sjunnesson.
Cheers,
Martin
#4
I will derive classes for other shapes also ;D (Circles only ATM)
05/19/2005 (2:55 pm)
:) went and did it myself, tell me how I make the object Physics compatible and Ill post it :DI will derive classes for other shapes also ;D (Circles only ATM)
#5
05/19/2005 (3:00 pm)
Very cool, have you tried making them children of fxSceneObject2D, that way it inherits all of that
#6
But I worry about this, how does it know what region the circle occupies, it doesnt!!
EDIT:
Aha!
addField("collisionGroupMask", ...
addField("collisionLayerMask", ...
addField("collisionCallback", ...
what do i do with these? LOL, how do i set the mask to a circlie :D
05/19/2005 (3:07 pm)
Yuhu XD. It can: Move, scale, change colour (set only :(, dont kno how to return colours :-/). All the basics. Im well pleased with myself.But I worry about this, how does it know what region the circle occupies, it doesnt!!
EDIT:
Aha!
addField("collisionGroupMask", ...
addField("collisionLayerMask", ...
addField("collisionCallback", ...
what do i do with these? LOL, how do i set the mask to a circlie :D
#7
Current Classes:
fxBaseShape2D
fxCircleShape2D (They're both the same class really :D)
Shall i make Triangles, Squares Etc?
How do i post a screenshot on 'ere?
05/20/2005 (9:10 am)
Kk, Circles now work, WITH PHYSICS :P, and TEXTURES (Circular only :-/)Current Classes:
fxBaseShape2D
fxCircleShape2D (They're both the same class really :D)
Shall i make Triangles, Squares Etc?
How do i post a screenshot on 'ere?
Torque Owner Philip Mansfield
Default Studio Name