월요일, 10월 16, 2006

일기 (2006.10.16)

기분이 그리 썩 좋지는 않지만 나쁘지도 않다. ㅎㅎ
오늘 서울 날씨가 좀 흐려서 기분은 좀 아니였다.

오늘 새벽까지 해서 잘 안되었던 .b3d setFrameLoop() 부분이 왜 잘못되었는지 알게 되었다.

PlayerNode->setFrameLoop(530*100, 589*100);

Luke: [link]
Sets the Speed the animation plays at (unrelated to transitions), this line will make the animation play at 10 frames a second (its really playing at 1000 frames per second but that’s just make the animation smooth, there’s no overhead/slowdown in doing this)

이로써 animate 를 보게 되었다. 하지만 문제는 이제부터 시작이다라는걸 잘 알고있다.
바로 KeyInput 이다. drawImage loop 사이에 KeyInput 과 animate frame rate 가 문제가 된다.
key 를 한번 누를때마다 정확한 수치는 아니지만 약 8번정도 loop 를 돌게된다. 그리고 animate 파일은 해당 구간에 대해 약 1 sec 가 걸린다. motion 은 run 이라고 하면 약 3 걸음 정도된다. 즉, 3 walk/sec 라는 소리다. 따라서 animate time 과 drawImage loop 를 잘 봐야 한다. 그냥 작성을 하면 frame 이 끝나고 다시 시작될때 (하나의 animate 의 반복) animate 간에 끊긴다는것이다. 여러가지 방법이 있겠지만 timer 를 쓰는 방법이 좋은 방법인지 아니면 animate frame rate 와 drawImage loop 의 timing 을 잘 조정해야 하는지... 다시 한번 봐야겠다...

댓글 없음:

댓글 쓰기