Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


radar Calculation help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ipivb
Master Cheater
Reputation: 5

Joined: 29 May 2010
Posts: 256

PostPosted: Thu Jun 17, 2010 3:31 am    Post subject: radar Calculation help Reply with quote

hello everyone,
im trying to make a radar for a game but don't know how to re-map the game's scale x,y to my forms scale x,y the game's scale is
Code:

Float Values
x Top =-12
x Bottom =12

Code:

Float Values
Y  Top =-12
Y Bottom =12

and say my form is
Code:

Width - 300
Height - 300

so say i was in game and i was in the middle of the map my x,y would be
Code:

X - 0
Y - 0

so how would i say get a picturebox to move with the x,y so it would go to the middle of my form
Code:

X - 150
Y - 150

if anyone could show some sample code on how to do the calculations that would be great! [/b]
im programming in
vb.net but if you have some codes in another language post them anyways it would help me
Back to top
View user's profile Send private message
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Thu Jun 17, 2010 3:42 am    Post subject: Reply with quote

I'm not sure what you're asking on the second part, but I just googled "stretching a picture in picturebox VB" and got a lot of good results for you(I assumed there would be a method already made for you for this, just like in Delphi there is one for the TBitmap, which is, from what I can tell, the picturebox equivelant.)

Most answers related to this question would need more information on what all you're doing with the game (reading by memory, reading pixel by pixel, are you making your own radar from scratch or are you modifying theirs or maybe making a radar to be able to look at while the game is minimized, etc etc) Similarly I can't tell what you mean about the "get a picturebox to move with the x,y so it would go to the middle of my form"

_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
zile
Advanced Cheater
Reputation: 0

Joined: 11 Jul 2009
Posts: 75

PostPosted: Thu Jun 17, 2010 4:01 am    Post subject: Reply with quote

if im not misunderstood by your question
you need to do something like MyXCoord/12*150

drawing a diagram helps
Back to top
View user's profile Send private message
ipivb
Master Cheater
Reputation: 5

Joined: 29 May 2010
Posts: 256

PostPosted: Thu Jun 17, 2010 4:59 am    Post subject: Reply with quote

Uzeil wrote:
I'm not sure what you're asking on the second part, but I just googled "stretching a picture in picturebox VB" and got a lot of good results for you(I assumed there would be a method already made for you for this, just like in Delphi there is one for the TBitmap, which is, from what I can tell, the picturebox equivelant.)

Most answers related to this question would need more information on what all you're doing with the game (reading by memory, reading pixel by pixel, are you making your own radar from scratch or are you modifying theirs or maybe making a radar to be able to look at while the game is minimized, etc etc) Similarly I can't tell what you mean about the "get a picturebox to move with the x,y so it would go to the middle of my form"

lol sorry i am making a radar that will show there position as a picturebox i am reading the memory of there x,y and trying to figure out how i could position that picture box to the the exact location on my form as to the game
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Jun 17, 2010 5:25 am    Post subject: Reply with quote

find the height and width of the radar in game. if the top left corner is -64y, -64x then the absolute value of that is the opposite, 64y, 64x. so it's 128 in height and width.

the easiest way would be to match your representation to it would be to just 1:1 or 1:2, etc. in a way that scales easily.

then all you'd need to do is add half the total of the radar.
Back to top
View user's profile Send private message
ipivb
Master Cheater
Reputation: 5

Joined: 29 May 2010
Posts: 256

PostPosted: Thu Jun 17, 2010 8:09 am    Post subject: Reply with quote

thanks guys got it =] C0deSlinger helped me alot
Code:
  converterdx.Text = -15.33 * playerX.Text
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites