문제

나는 GL에 새로운 것을 새로운 것으로 만들고 타일지도를 자기 수송으로 만들고 싶었습니다.나는 작은 (어쩌면 7 헥스 와이드 / 키가 크고) 16 진수지도를 만들고 싶습니다.나의 첫 번째 생각은 하나의 16 진수를 그리는 방법을 만드는 방법이었습니다. 그런 다음 적절한 오프셋을 번역하고 새로운 16 진수를 배치하는 것입니다.그러나 이것은 효과가없는 것처럼 보이지 않습니다.어떤 생각이든지?ALOS는 측면 질문으로, 주어진 16 진수의 i의 숫자가있는 것인지를 어떻게 결정합니까?

도움이 되었습니까?

다른 팁

To determine if a MotionEvent is within a certain hex you have to convert the coords passed in via the motion event to your OpenGL World coords. Its just like a unit conversion, you know the screen goes from 0 - WIDTH and your GL world lets say goes from -1 to 1.

(xCoord / (Width - 0)) * (1 - (-1)) = xCoordWorld

will give you the xCoord from 0 to 2, then subtract 1 to get it in -1 to 1.

As far as the hexes go I've always used 'art' hexes. Draw the hex out in paint then render a bunch of squares with that piece of art on them, fast and easy to swap a hex out for another hex.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top