Slaps forehead, Homer Simpson style...
The problem with the flea player not picking up simultaneous jump and left / right arrow key presses was entirely self-inflicted and not due to a slow computer.
The old code merged all key press detection into one multiway if statement:
if the.keys:pressed("left") then self:walkLeft() elseif the.keys:pressed("right") then self:walkRight() elseif the.keys:pressed(" ") then playSound('jump.ogg') self:jumpAction() endThe solution is to group exclusive key presses together (left | right) but use separate if statements for independent actions (jump):
if the.keys:pressed("left") then self:walkLeft() elseif the.keys:pressed("right") then self:walkRight() end -- We can detect more then one key press per frame if we -- don't nest them within the same if-elseif ... statement if the.keys:pressed(" ") then playSound('jump.ogg') self:jumpAction() endAnnoyingly I was aware of this idiom as the player control has had it before, but it got removed in a frustrated bout of hacking. This obviates the need for yesterdays Pachinko inspired player control.