Draw a Resizeable Circle?

For questions about using Classic.

Post » Fri Dec 17, 2010 10:46 pm

Hi, maybe this was asked before.

But, I need to draw a circle that wont get fuzzy/pixelated no matter what size. And it needs to VERY big so I can't prerender it and shrink it down.

I thought I could do this with the canvas object, But I can't find it. And I remember in earlier builds of Construct a Circle.FX which might work.

Any help?
Follow me on Twitter @evgLabs
B
33
S
14
G
4
Posts: 251
Reputation: 4,049

Post » Fri Dec 17, 2010 11:05 pm

if its an outline of a circle you want, you can use a canvas object, if you want a filled circle, your going to make some custom code with distort maps and stuff. how BIG does it have to be, and whats the intended use?
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Fri Dec 17, 2010 11:13 pm

[quote:1mvhoz63]how BIG does it have to be?[/quote:1mvhoz63]

Um, that's the thing HUGE. And I mean huge big. Thousands of pixels across, If the player comp can handle it. (It is a settable preference in the game)

[quote:1mvhoz63]and whats the intended use?[/quote:1mvhoz63]

An area of influence between objects so the player can monitor the strength.
Follow me on Twitter @evgLabs
B
33
S
14
G
4
Posts: 251
Reputation: 4,049

Post » Fri Dec 17, 2010 11:57 pm

That kind of rules out canvas, it can only draw when its on screen.
Plus it can take up a lot of ram.

Does the player actually have to see the hole?

If so you could apply the colored outline fx to a pre rendered sprite. It has an alpha setting that should help when you get a little "jaggy".

If you don't need to see it, you could always go with distance(x1,y1,x2,y2).
Where x1,y1 are the center of the object, and x2,y2 are the other objects.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sat Dec 18, 2010 12:00 am

If you can't get decent performance, you might want to do what starcraft 2 does with the range of siege tanks instead or as a fallback it it hits the framerate. I can't find a screenshot atm but it puts a ring of sprites around the range instead of a solid ring.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sat Dec 18, 2010 6:11 pm

As is said, if you want only an outline, the canvas will work perfectly, you just need to use a loop and do a bit of trig, and the canvas can stay the same size on screen (full window) it doesn't need to be bigger
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Dec 18, 2010 8:14 pm

[quote="QuaziGNRLnose":1jm57wrl]As is said, if you want only an outline, the canvas will work perfectly, you just need to use a loop and do a bit of trig, and the canvas can stay the same size on screen (full window) it doesn't need to be bigger[/quote:1jm57wrl]

Not sure what you mean. Are you talking about a portion of the circle?

Here's this till someone figures out a trig version.
[url:1jm57wrl]http://dl.dropbox.com/u/666516/circle.cap[/url:1jm57wrl]
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sun Dec 19, 2010 2:10 am

Do you want something like this?
http://dl.dropbox.com/u/10316081/circle.cap

You will need
Disk Effect: tulamide
viewtopic.php?f=29&t=5703
Alpha Inverse effect: Made just for this
http://dl.dropbox.com/u/10316081/Alpha%20Inverse.fx
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Sun Dec 19, 2010 5:13 am

Here is a cap with some additional ways to make a circle with the canvas object:
1. Filled circle.
2. Polyline circle. (the trig way)
3. Graph of a circle.
[url:3qm5py8i]http://dl.dropbox.com/u/5426011/examples3/circle.cap[/url:3qm5py8i] made in 0.99.96.
B
79
S
24
G
53
Posts: 4,728
Reputation: 40,219

Post » Sun Dec 19, 2010 8:55 am

Haha, now that's service.

Question tho, is anyone else getting lines across the bottom of the filed circle?
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests