Advertisement
esfo

planet generation step controller

Jan 16th, 2023
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. current_chunk = {
  2.     x : floor(player_x / chunk_size),
  3.     y : floor(player_y / chunk_size)
  4. }
  5.  
  6. if (chunk.x != current_chunk.x or chunk.y != current_chunk.y) {
  7.     show_debug_message(current_chunk)
  8.     switch_chunk(current_chunk, chunk)
  9.     chunk = current_chunk
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement