I'm trying to create a Breakout clone using C++, and so have several objects (like ball, paddle, powerupicon, block, etc). I understand that it's bad practice to have them at global scope, so they're initialized inside main(). The problem comes in with needing to do stuff with those objects from inside other functions (like redraw(), or reset\_game()). The only method I can think of to do this would be to pass references of the objects into each function, but I'm not sure if this is the best approach.

Basically, what's the best way to do stuff with these objects from within a function? Pass them by reference? Make them global but within a namespace? Or something completely different?