Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 09:54

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



move object around circle on c#

Discussion on move object around circle on c# within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
move object around circle on c#

this isn't related to co
if u got 2 object , circle and image (or another small circle)
how to let the small circle goes around the big one (from it's center it's center throw the circumstance of the big one) , well what about the small one spin around itself ?

i was trying to do this but Graphics >> creategraphics dont actually gives u the graphic u created as object , it just draw it -.-

any idea or link will be appreciated ..

p.s dont try to get coords throw the big circle being object , try to get it from radius (as every coordinate on the circle is an end point of a radius and it's projection is a 90 degree , which actually it's projection is Y and triangle third side is the X wish it made sense)
injection illusion logic is offline  
Old 03/21/2012, 19:12   #2
 
elite*gold: 0
Join Date: Jun 2006
Posts: 457
Received Thanks: 67
not sure what you're asking... if you want a small circle to be moving on the circumference of the bigger circle, you can definitely use the right angled triangle method to assign new coordinate for your small circle, and redraw it. Iterate the pre mentioned procedure you will be able to get the small circle moving.
shitboi is offline  
Old 03/22/2012, 02:48   #3
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
true but that's in case the big circle is actually an object which i cant do in c# that's why im asking for help
for example
Quote:
Pen pencolor2 = new Pen(Color.Red);
Graphics draw;
r = d1 / 2;
draw = CreateGraphics();
draw.DrawEllipse(pencolor2, forx(350, r), fory(150, r), d1, d2);
now after i draw a circle , how will i use it and it's just a line o-0
aka it's not an object unlike picture
Quote:
sumopic.Location = new System.Drawing.Point(forx(350,50),fory(150,50));
got my point ?
P.S forx,fory is just methods editing the center as create graphics always using the upper left vertex to draw from not mid point

edit : here is the math
Quote:
int circlePosX = centerX + Math.Cos(degrees) * radius;
int circlePosY = centerY + Math.Sin(degrees) * radius;

where timmer ticks and the angel(degrees) set the speed and this prev method is the path
anyone ?
injection illusion logic is offline  
Old 03/26/2012, 21:07   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Yes, I actually bothered to log in to answer this because it both intrigued me (yay graphics) and confused me (yay stupid me).

#1: If you're dealing with graphics... use a graphics framework. XNA is fantastic and super powerful.

#2: If you insist on using base C# then either A: apply proper graphics procedures or B: write in a way that fits with application approach to programming.


If you do wish to work without a framework then you want what amounts to a game loop.

In this case you clear the entire screen and then re-draw the 'current' frame every time you wish to update. This is messy because you're trying to mix your approaches and you loose any benefit or controlability that using a gameloop would give you when used in the proper context (again, look at xna)

If you want to stick with the application type approach then it's also very simple... Instead of using a pen tool to draw an elipse, create an image to represent your circle (can be done programatically from inside the program) and simply move the location of this image around another image.

To clarify, when I say you can create it from inside the program I mean you can manually assign the pixel values for the image to draw a circle as you wish it to look.
pro4never is offline  
Thanks
1 User
Old 03/27/2012, 18:56   #5
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
**** my question the most awesome thing that i saw u here once again
and yes if u r drawing in an imagebox it wont be effected with the graphic update which wont remove all what u draw at refresh(ex: minimizing and once any other object move on them)
but yeah framwork with xna is amazing , was trying to build it as native c# but when i used xna it saved alot for me
about image box it's hard to interact with another objects (aka if u got a picture of png with a transparent background it will still not show what's under it which is called layers in photoshop)
thanks once more for the reply and really happy that u logged in to reply
injection illusion logic is offline  
Reply


Similar Threads Similar Threads
Help Circle Tool
08/27/2011 - DarkOrbit - 4 Replies
Who can help me with circle tool plz i cant use it:confused:. plz help
Circle Scatter or Circle Right-Clicker
08/14/2010 - CO2 Bots & Macros - 14 Replies
K, I made this simple Macro with Macro Express 3 and I'm pretty sure you can't use it without Macro Express, so if you don't have it you should look at this topic: http://www.elitepvpers.com/forum/co2-guides-templat es/77264-macro-express.html It basically just right clicks in a circle around you, nothing all that new, the reason I made this was because I couldn't find one that stood still and right clicked, that worked on another screen other than and continuously went. It might even work a...
Overhill Circle
01/23/2009 - World of Warcraft - 0 Replies
Ich wollte nur bescheid sagen,dass die anwendung von hacks nun auf den Overhill-Circle endteckt wird und man recht flott gebannt wird. Da sie ein programm laufen haben,dass diese hacks entdeckt. und dann hab ich noch ne frage : gibt es bugs die auf den overhill circle noch laufen? wenn ja bitte bescheid sagen :)
Fire Circle.
08/31/2008 - Conquer Online 2 - 2 Replies
Where and how to upgrade fire circle fastest way ?



All times are GMT +1. The time now is 09:54.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.