game logic,  now using own string encoder => null terminated string