Author Topic: RE: Camera Problem  (Read 2317 times)

Offline sushobhit

  • long
  • ***
  • Posts: 109
  • future is now
    • View Profile
    • ANDROID APPS
RE: Camera Problem
« on: April 05, 2014, 12:17:14 pm »
Hi Egon ,
A week back I posted about the problem I was facing with translation of object along with the camera. Well tried everything
that I can but still now results. So I am attaching the whole program with this post plz help me solve the problem.
I have also attached a README to pinpoint the issue. You can find it in the attached RAR :

Download Link : http://www.sendspace.com/file/j769yr

ASAP

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: RE: Camera Problem
« Reply #1 on: April 06, 2014, 03:33:20 pm »
The readme alone would have cleared it all up...jPCT-AE isn't thread safe. You must not modify jPCT related instances from outside the rendering thread (at least not without proper synchronization, if you feel that you have to). The best advise i can give it put your game logic in the rendering thread. There's no point in executing movements that might never be displayed because they happen inbetween two rendered frames anyway. A little more detail can be found here: http://www.jpct.net/wiki/index.php/Thread_safety

Offline sushobhit

  • long
  • ***
  • Posts: 109
  • future is now
    • View Profile
    • ANDROID APPS
Re: RE: Camera Problem
« Reply #2 on: April 07, 2014, 07:26:43 am »
Hi Friend ,

Last night i figured it out myself
just when I called object.translate
&      camera.movecamera from OnDrawFrame()
things started working smoothly and everything got back to normal
It happened when I was going through AlienRunner source there in OnDrawFrame
updateGameState() was being called so i thought why not try updating from onDrawFrame
and the dices started rolling in my favor.....Thanks A Ton