I would say it depends on the programmer and how he decides to construct the game. A well structured game (according to OOPD) can be made without global vars, but sometimes it may just be easier to make a variable global.

About the examples, I have the impression that they were made quick (thereby not caring to much about OOPD) to demonstrate SDL and not to demonstrate how you would program a well designed game.