Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 13,972 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 5 1 2 3 4 5
Re: Concentric circles [Re: lostclimate] #189500
03/20/08 13:37
03/20/08 13:37
Joined: Sep 2003
Posts: 208
Michael_McCrickard Offline OP
Member
Michael_McCrickard  Offline OP
Member

Joined: Sep 2003
Posts: 208
Sounds good, lostclimate. Are you interested in trying to do this for pay?

Re: Concentric circles [Re: Michael_McCrickard] #189501
03/20/08 17:18
03/20/08 17:18
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
mediocre history: tD, C-Script, 6.40.5, 6.60
Circles with forgotten old custom C-Script function utilizing draw line commands, and parameters resolution=60, radius=90,60,30, position=?, color=red,green,blue are less appealing than ads on page.
http://testdummy93.tripod.com/3DGS/3DGS_samples.html


Re: Concentric circles [Re: testDummy] #189502
03/20/08 18:39
03/20/08 18:39
Joined: Sep 2003
Posts: 208
Michael_McCrickard Offline OP
Member
Michael_McCrickard  Offline OP
Member

Joined: Sep 2003
Posts: 208
That's it! I had forgotten all about that draw_line() command. Time to relearn my trigonometry. Thanks a lot, testDummy!

Last edited by Michael_McCrickard; 03/20/08 18:51.
Re: Concentric circles [Re: Michael_McCrickard] #189503
03/21/08 02:02
03/21/08 02:02
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
definately interested if your still up for it

Re: Concentric circles [Re: lostclimate] #189504
03/21/08 04:07
03/21/08 04:07
Joined: Sep 2003
Posts: 208
Michael_McCrickard Offline OP
Member
Michael_McCrickard  Offline OP
Member

Joined: Sep 2003
Posts: 208
If you got my email, then shoot me a reply so we can discuss. Otherwise, PM me or send a message to the email address in my Profile. Thanks.

Re: Concentric circles [Re: Michael_McCrickard] #189505
03/21/08 10:10
03/21/08 10:10

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Why not make a animated (transparent) sprite with a growing circle?
You can easy define the number of frames, can make the growing logarithmic, and save a lot of cpu power...

Re: Concentric circles [Re: ] #189506
03/21/08 15:08
03/21/08 15:08
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
For those that like to throw pies, here is a cached draw circle function, simple, raw and unoptimized.
Code:

/************************************
drawCircle3D0
*************************************/
var drawCircleS0[3];
var drawCircleE0[3];

function drawCircle3D0(&_pos, _radius, _res, &_color) {
var angle0; angle0 = 0;
var i0; i0 = 0;
var vec11[3];

while (i0 < (_res + 1)) {
angle0 = 360 / _res * i0;
drawCircleE0[0] = 0; drawCircleE0[1] = _radius; drawCircleE0[2] = 0;
vec_rotate(drawCircleE0, vector(0, 0, angle0));
vec_add(drawCircleE0, _pos);
if (i0 > 0) {
drawLine3D0(drawCircleS0, drawCircleE0, _color, 100);
//printVec0("drawCircleS0 = ", drawCircleS0);
//printVec0("drawCircleE0 = ", drawCircleE0);
}
//printVar0("angle0 = ", angle0);
i0 += 1;
vec_set(drawCircleS0, drawCircleE0);
}

}


The previously shown sample, uses a res of 60 divisions or so.
A7 users must pay a fee of 55 Euros to use derivatives of the above function (sub par or not).



Re: Concentric circles [Re: testDummy] #189507
03/21/08 15:18
03/21/08 15:18
Joined: Sep 2003
Posts: 208
Michael_McCrickard Offline OP
Member
Michael_McCrickard  Offline OP
Member

Joined: Sep 2003
Posts: 208
THANKS SO MUCH! THIS IS IT!

Re: Concentric circles [Re: Michael_McCrickard] #189508
03/27/08 17:30
03/27/08 17:30
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Happy Birthday Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
I would solve that with a shader and a sprite...
passing the distance to the shader and it sets transparence to 0 or 1...

here's the shader...:

Code:
float4x4 matWorldViewProj;
float3 lineColor = {0.0,1.0,0.0};
float2 vecSkill41;
float4 vecColor;


void circleVS( in float4 pos :POSITION,
in float2 tex :TEXCOORD0,
out float4 oPos:POSITION,
out float2 oTex:TEXCOORD0)
{
oPos = mul(pos,matWorldViewProj);
oTex = tex;
}

float4 circlePS(in float2 texcrd:TEXCOORD0):COLOR
{
float pDist = distance(float2(0.5,0.5),texcrd);
float4 Color;
Color.rgb = lineColor;
if(pDist>vecSkill41.x-vecSkill41.y&&pDist<vecSkill41.x)
Color.w = vecColor.w;
else
Color.w = 0;
return Color;
}

technique circle
{
pass p0
{
vertexshader = compile vs_2_0 circleVS();
pixelshader = compile ps_2_0 circlePS();
}
}



...and here a little script you can try it with
Code:
MATERIAL* circleMtl =
{
effect="circle.fx";
}

void main()
{
float circleAnm = 0;
level_load(NULL);
you=ent_create("circle.tga",nullvector,NULL);
your.tilt = 90;
your.skill42 = floatv(0.02);
your.material = circleMtl;
set(your,TRANSLUCENT);
watched=you;
while(1)
{
circleAnm += 0.7*time_step;
if(circleAnm>50)
circleAnm=0;
your.skill41 = floatv(circleAnm/100);
your.alpha = 100-circleAnm*2;
wait(1);
}
}



have fun with it...(ofc you can also use more than one line with it )

Last edited by Scorpion; 03/27/08 17:31.
Re: Concentric circles [Re: Scorpion] #189509
03/27/08 17:39
03/27/08 17:39
Joined: Sep 2003
Posts: 208
Michael_McCrickard Offline OP
Member
Michael_McCrickard  Offline OP
Member

Joined: Sep 2003
Posts: 208
Well, thanks very much for this. I will certainly try this out!

This reminded me that I haven't posted the code that I came up with from the functions that testDummy provided. If anyone wants to try it, it's here:

http://mccrickard.net/circles.wdl

Page 2 of 5 1 2 3 4 5

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1