I've had formal education in Java for around half a year now, and as a hobby I would like to attempt game development. I've downloaded the Slick2d library to help with this.
I've run into a problem as of right now. When I create my game objects, like player, etc. I presume I have to do this in the pre-build init() method, but I probably could do it in the main() as well (What one would you suggest?). Now, my question is, when I create a Player instance in init() or main(), how do I pass it to the update() method? I could of course make the player object public/global, but I've been taught that this is very poor programming, so I'm reluctant to do this.
I would greatly appreciate an answer, since I would like to learn to do things the "correct" way, and as of right now I have no single clue what that is. Thanks for your consideration.