Space to place, z to render saved list and x to clear saved list (tiles). Left & Right arrow keys to switch tile type and c to delete selected tile. Hold v to see tile name. q to place/mark tile collision and e to erase selected tile collision. Press 1 and 2 to switch between editing modes. WASD to move player
ok I think I fixed it also optimized the code a bit