ilya-pi / Pixel-Castle

Corona SDK powered mobile pixel-tribute game with fatalities
1 stars 1 forks source link

Why do we render (calculate coords) controls in gameLoop? #52

Closed ilya-pi closed 11 years ago

ilya-pi commented 11 years ago

Atm on each game loop (10 times each second) we render controls for each respective player. Check line 50 in main.lua —

  local function gameLoop()

       if game.state.name == "P1" then
          game.controls1:render()

I believe that we should do it once in the transition method between MOVE_TO_P1 —> P1

nakedpony commented 11 years ago

You a free to try this, I'm busy with castle-bullet interaction at the moment. P.S. We render the controls in a loop because we need to update an angle.