Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBrother Bob

Posted 22 July 2013 - 12:12 PM

The only thing I have noticed is that if a touchEvent is too close or too far away from the turret it loses a great deal of accuracy. If the touchEvent is about half of the distance from the turret to the top of the screen its dead on.

Edit: Ignore all the following confused musing, I've been awake for a day now, I'm hung-over and I did not read your code first.  I guess I must think I'm Richard Feynman or something, like I can just imagine the solution without looking at anything first.  Dunh!..  Half of what I was wondering about is written right there at the beginning of your code post. I had just assumed that it was exactly as I had written. Silly!  I'm just going to leave the mess below for now so I can laugh at myself later.

 

How interesting.  I will move this into my iOS framework and see if I have the same issue. Maybe this is related to the screen coordinates being some variant of an integer and the algorithm above uses floating point numbers.  If the formula is being driven by numbers like 1, 2, 3, 4, .... 700 this might really screw things up.

 

Does the Android OS graphics API have translation and rotation calls that use floats in the range of let's say -10, +10?  Or is it using integers that look more like the devices physical pixel coordinates? i.e. 800*400

 

hmmmm .... Now how do we get those screen pixel coordinate numbers down to something that matches your artworks's dimensions???

 

hmmmmm?? What are the artworks dimensions??? 

 

hmmmmm???  Is this the right way to word this problem????

 

hmmmmmm.  I'm stumped for now. I guess it's time for one of those fudge-factor numbers that scientists and engineers are always so fond of. 

 

Oh wait, I know!.... I think???? What is the model's position value when it is at the left side of the screen?? Then to the right side of the screen?

Now, what does the finger position value look like when you move your finger from the left side of the screen to the right side of the screen?

This will give the ratio that's needed to scale the coordinates for POSITION_01 and POSITION_02 so they are both in the same range.

 

 

If the numbers for your artwork's position and the numbers for your finger position look more or less exactly the same, when you move from left to right then I am stumped...

If they are very different then we may have the culprit. 

 

I think we have to get the screen's pixel measurements down into this range, so it matches up with the characters position and rotation.  Right now I think they are likely very our of proportion to one another.  Maybe the finger touch screen positions are floats already.  Who knows with Google...

 

We better both do some more digging.


#9marcClintDion

Posted 22 July 2013 - 03:13 AM


 There is far too much arrogance and out right abuse by site moderators, they are teaching other people to behave this way.  The posts I've made will all be shorty removed and replaced with this notice.  Game development is not the only thing being taught here, bad behavior is being taught as well.


#8marcClintDion

Posted 22 July 2013 - 03:12 AM

There is far too much arrogance and out right abuse by site moderators, they are teaching other people to behave this way.  The posts I've made will all be shorty removed and replaced with this notice.  Game development is not the only thing being taught here, bad behavior is being taught as well.

#7marcClintDion

Posted 29 June 2013 - 10:26 AM


The only thing I have noticed is that if a touchEvent is too close or too far away from the turret it loses a great deal of accuracy. If the touchEvent is about half of the distance from the turret to the top of the screen its dead on.

Edit: Ignore all the following confused musing, I've been awake for a day now, I'm hung-over and I did not read your code first.  I guess I must think I'm Richard Feynman or something, like I can just imagine the solution without looking at anything first.  Dunh!..  Half of what I was wondering about is written right there at the beginning of your code post. I had just assumed that it was exactly as I had written. Silly!  I'm just going to leave the mess below for now so I can laugh at myself later.

 

How interesting.  I will move this into my iOS framework and see if I have the same issue.   Maybe this is related to the screen coordinates being some variant of an integer and the algorithm above uses floating point numbers.  If the formula is being driven by numbers like 1, 2, 3, 4, .... 700 this might really screw things up.

 

Does the Android OS graphics API have translation and rotation calls that use floats in the range of let's say -10, +10?  Or is it using integers that look more like the devices physical pixel coordinates? i.e. 800*400

 

hmmmm .... Now how do we get those screen pixel coordinate numbers down to something that matches your artworks's dimensions???

 

hmmmmm?? What are the artworks dimensions??? 

 

hmmmmm???  Is this the right way to word this problem????

 

hmmmmmm.  I'm stumped for now. I guess it's time for one of those fudge-factor numbers that scientists and engineers are always so fond of. 

 

Oh wait, I know!.... I think???? What is the model's position value when it is at the left side of the screen?? Then to the right side of the screen?

Now, what does the finger position value look like when you move your finger from the left side of the screen to the right side of the screen?

This will give the ratio that's needed to scale the coordinates for POSITION_01 and POSITION_02 so they are both in the same range.

 

 

If the numbers for your artwork's position and the numbers for your finger position look more or less exactly the same, when you move from left to right then I am stumped...

If they are very different then we may have the culprit. 

 

I think we have to get the screen's pixel measurements down into this range, so it matches up with the characters position and rotation.  Right now I think they are likely very our of proportion to one another.  Maybe the finger touch screen positions are floats already.  Who knows with Google...

 

We better both do some more digging.


#6marcClintDion

Posted 29 June 2013 - 10:24 AM


The only thing I have noticed is that if a touchEvent is too close or too far away from the turret it loses a great deal of accuracy. If the touchEvent is about half of the distance from the turret to the top of the screen its dead on.

Edit: Ignore all the following confused musing, I've been awake for a day now, I'm hung-over and I did not read your code first.  I guess I must think I'm Richard Feynman or something, like I can just imagine the solution without looking at anything first.  Dunh!..  Half of what I was wondering about is written right there at the beginning of your code post. I had just assumed that it was exactly as I had written. Silly!  I'm just going to leave the mess below for now so I can laugh at myself later.

 

How interesting.  I will move this into my iOS framework and see if I have the same issue.   Maybe this is related to the screen coordinates being some variant of an integer and the algorithm above uses floating point numbers.  If the formula is being driven by numbers like 1, 2, 3, 4, .... 700 this might really screw things up.

 

Does the Android OS graphics API have translation and rotation calls that use floats in the range of let's say -10, +10?  Or is it using integers that look more like the devices physical pixel coordinates? i.e. 800*400

 

hmmmm .... Now how do we get those screen pixel coordinate numbers down to something that matches your artworks's dimensions???

 

hmmmmm?? What are the artworks dimensions??? 

 

hmmmmm???  Is this the right way to word this problem????

 

hmmmmmm.  I'm stumped for now. I guess it's time for one of those fudge-factor numbers that scientists and engineers are always so fond of. 

 

Oh wait, I know!.... I think???? What is the model's position value when it is at the left side of the screen?? Then to the right side of the screen?

Now, what does the finger position value look like when you move your finger from the left side of the screen to the right side of the screen?

This will give the ratio that's needed to scale the coordinates for POSITION_01 and POSITION_02 so they are both in the same range.

 

 

If the numbers for your artwork's position and the numbers for your finger position look more or less exactly the same, when you move from left to right then I am stumped...

If they are very different then we may have the culprit. 

 

I think we have to get the screen's pixel measurements down into this range, so it matches up with the characters position and rotation.  Right now I think they are likely very our of proportion to one another.  Maybe the finger touch screen positions are floats already.  Who knows with Google...

 

We better both do some more digging.


#5marcClintDion

Posted 29 June 2013 - 10:18 AM


The only thing I have noticed is that if a touchEvent is too close or too far away from the turret it loses a great deal of accuracy. If the touchEvent is about half of the distance from the turret to the top of the screen its dead on.

 

How interesting.  I will move this into my iOS framework and see if I have the same issue.   Maybe this is related to the screen coordinates being some variant of an integer and the algorithm above uses floating point numbers.  If the formula is being driven by numbers like 1, 2, 3, 4, .... 700 this might really screw things up.

 

Does the Android OS graphics API have translation and rotation calls that use floats in the range of let's say -10, +10?  Or is it using integers that look more like the devices physical pixel coordinates? i.e. 800*400

 

hmmmm .... Now how do we get those screen pixel coordinate numbers down to something that matches your artworks's dimensions???

 

hmmmmm?? What are the artworks dimensions??? 

 

hmmmmm???  Is this the right way to word this problem????

 

hmmmmmm.  I'm stumped for now. I guess it's time for one of those fudge-factor numbers that scientists and engineers are always so fond of. 

 

Oh wait, I know!.... I think???? What is the model's position value when it is at the left side of the screen?? Then to the right side of the screen?

Now, what does the finger position value look like when you move your finger from the left side of the screen to the right side of the screen?

This will give the ratio that's needed to scale the coordinates for POSITION_01 and POSITION_02 so they are both in the same range.

 

 

If the numbers for your artwork's position and the numbers for your finger position look more or less exactly the same, when you move from left to right then I am stumped...

If they are very different then we may have the culprit. 

 

I think we have to get the screen's pixel measurements down into this range, so it matches up with the characters position and rotation.  Right now I think they are likely very our of proportion to one another.  Maybe the finger touch screen positions are floats already.  Who knows with Google...

 

We better both do some more digging.


PARTNERS