Practice and trying to “Keep it simple”. I re-lookup lots of code during but the more often I do that, the more I remember.
Best of luck to your game :D