This reminds me of QBasic for DOS -- you have the code and the execution environment tightly integrated. (I think QBasic did have some graphics support, though?)
Thinking back on it, QBasic might have created a generation of programmers -- you would copy a working game from a friend, and then try to modify the source code to let yourself cheat.