Furtano
12-30-2011, 04:57 PM
Hello,
i'm programming battleship for Opengl.
I have already the game logic and it works fine.
Now im programming the graphics and i want to draw a field 10x10.
I do this with the drawGameField();
Problem that i don't understand:
Line 71: why i must translate with this strange numbers? isnt there a formula ?
Line 98: again, why i must devide with 2 ?
Line 101: why *2 ?
I dont understand it.
Later i want to navigate the fields by pressing keys, and i dont know if it will really work with these numbers.
Next Problem is, that i got 10 fields but the lines are overlapping.
Field looks like this:
http://www.abload.de/img/skizpt7.gif
Thanks :)
i'm programming battleship for Opengl.
I have already the game logic and it works fine.
Now im programming the graphics and i want to draw a field 10x10.
I do this with the drawGameField();
Problem that i don't understand:
Line 71: why i must translate with this strange numbers? isnt there a formula ?
Line 98: again, why i must devide with 2 ?
Line 101: why *2 ?
I dont understand it.
Later i want to navigate the fields by pressing keys, and i dont know if it will really work with these numbers.
Next Problem is, that i got 10 fields but the lines are overlapping.
Field looks like this:
http://www.abload.de/img/skizpt7.gif
Thanks :)