geek-ai / MAgent

A Platform for Many-Agent Reinforcement Learning
MIT License
1.69k stars 332 forks source link

what's view_position #73

Open jackfong123 opened 4 years ago

jackfong123 commented 4 years ago
 Hello~ I want to double the display scenes in a window, however, I cann't understand the meaning of view_position in pygame_render.py.  And how the following code work?

draw_rect_matrix(grid_map, (127, 127, 127), (x * grid_size - view_position[0], y * grid_size - view_position[1]), grid_size, grid_size, resolution) Could someone give me a brief explaination? Sincerely hope your reply!