How do I keep user input and rendering independent of the implementation environment?
- by alex
I'm writing a Tetris clone in JavaScript. I have a fair amount of experience in programming in general, but am rather new to game development.
I want to separate the core game code from the code that would tie it to one environment, such as the browser.
My quick thoughts led me to having the rendering and input functions external to my main game…