I'm having trouble implementing collision detection between game objects, such as the main character and obstacles. Can anyone guide me on best practices or provide a basic example of collision detection code?