From: Zbigniew <ze...@in...> - 2004-05-14 18:36:55
|
> optional number of decimal places is omitted), so int(round(x)) should > always be the nearest integer. that's it! I didn't notice how exactly int() function does work. Thank you all for the effort and please forgive me the problems I had with describing the problem I had. >if abs(pos2 - pos1) < 0.01: > handle_collision() thats also very good The fixed game should be there: http://zeeball.w.interia.pl/bin/snake3d.tar.bz2 I have added in comments short description of the game. Let me know if anyone managed to play that game with or without this description: # there is 3D space with green box and flashing box # the green box is the food for the snake # and the flashing box is head of the snake # the snake is always moving in in Z direction # therefore to navigate the snake we have to rotate # the whole space with arrow keys till the snake # collides with food Once again big thanks! Zbigniew Trzcionkowski <ze...@in...> |