Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualMedo3337

Posted 10 January 2013 - 02:50 AM

One thing that I think I should take care of is the bullet speed, in real life the bullet will arrive based on the speed and the distance.

So, I'm trying to find a way to delay the bullet arrival time for certain amount of time in milliseconds (depends on how far is the target).

 

The following should do the trick but definitely it will not only delay the bullet arrival but it will delay rendering as well:

while(...)
{
    // Delay until the bullet arrive (based on the bullet speed and the distance)
}

 

Maybe I can create a thread for shooting and do the above code in that thread then use a callback method to get the shooting result?

 

I need suggestion on what is the best way to do it without affecting the rendering, BTW I'm using a single method that I call for shooting and it should get me the shooting results every time I call it.


#4Medo3337

Posted 10 January 2013 - 02:31 AM

One thing that I think I should take care of is the bullet speed, in real life the bullet will arrive based on the speed and the distance.

So, I'm trying to find a way to delay the bullet arrival time for certain amount of time in milliseconds (depends on how far is the target).

 

The following should do the trick but definitely it will not only delay the bullet arrival but it will delay rendering as well:

while(...) { // Delay until the bullet arrive (based on the bullet speed and the distance) }

 

Maybe I can create a thread for shooting and do the above code in that thread then use a callback method to get the shooting result?

 

I need suggestion on what is the best way to do it without affecting the rendering, BTW I'm using a single method that I call for shooting and it should get me the shooting results every time I call it.


#3Medo3337

Posted 09 January 2013 - 11:58 PM

One thing that I think I should take care of is the bullet speed, in real life the bullet will arrive based on the speed and the distance.

So, I'm trying to find a way to delay the bullet arrival time for certain amount of time in milliseconds (depends on how far is the target).

 

The following should do the trick but definitely it will not only delay the bullet arrival but it will delay rendering as well:

while(...) { // Delay until the bullet arrive (based on the bullet speed and the distance) }

 

I need suggestion on what is the best way to do it without affecting the rendering, BTW I'm using a single method that I call for shooting and it should get me the shooting results every time I call it.


#2Medo3337

Posted 09 January 2013 - 11:57 PM

One thing that I think I should take care of is the bullet speed, in real life the bullet will arrive based on the speed and the distance.

So, I'm trying to find a way to delay the bullet arrival time for certain amount of time in milliseconds (depends on how far is the target).

 

The following should do the trick but definitely it will not only delay the bullet arrival but it will delay rendering as well:

while(...) { // Delay until the bullet arrival (based on the bullet speed and the distance) }

 

I need suggestion on what is the best way to do it without affecting the rendering, BTW I'm using a single method that I call for shooting and it should get me the shooting results every time I call it.


#1Medo3337

Posted 09 January 2013 - 11:53 PM

One thing that I think I should take care of is the bullet speed, in real life the bullet will arrive based on the speed and the distance.

 

So, I'm trying to find a way to delay the bullet arrival time for certain amount of time in milliseconds (depends on how far is the target).

 

The following should do the trick but definitely it will not only delay the bullet arrival but it will delay rendering as well:

 

while(...) { // Delay until the bullet arrival (based on the bullet speed and the distance) }

 

I need suggestion on what is the best way to do it without affecting the rendering, BTW I'm using a single method that I call for shooting and it should get me the shooting results every time I call it.


PARTNERS