A classic arcade-style game where Yogi Bear collects picnic baskets while avoiding rangers in Yellowstone National Park.
Navigate Yogi Bear through multiple levels of Yellowstone National Park, collecting picnic baskets while avoiding patrolling rangers. Watch out for obstacles like mountains and trees that will block your path!
- Multiple challenging levels
- WASD movement controls
- Obstacle avoidance (mountains and trees)
- Patrolling rangers with horizontal and vertical movement patterns
- Score tracking system
- High score database with top 10 leaderboard
- Three lives system with respawn mechanics
- Level progression system
- Java Runtime Environment (JRE)
- PostgreSQL database
- Clone the repository
- Set up the PostgreSQL database using the provided schema
- Configure the database connection in the
DatabaseManagerclass - Run the game using
java -jar yogibear.jar
- Use WASD keys to move Yogi Bear
- Collect all picnic baskets to complete each level
- Avoid rangers - getting within one unit of distance costs a life
- Press ESC to pause the game
- Game ends when all lives are lost
- Enter your name to save your high score
- Player Character: Yogi Bear with WASD movement
- Rangers: Patrol either horizontally or vertically
- Picnic Baskets: Collectibles that increase score
- Obstacles: Mountains and trees that restrict movement
- Lives System: Three lives with park entrance respawn
- Database Integration: PostgreSQL for high score storage
- Built using Java Swing for GUI
- Object-oriented architecture
- Level loading system using text files
- PostgreSQL database integration for score management
- Collision detection system
- Event handling for player input
The game includes:
- Main game interface with score display
- High score leaderboard
- Game over screen
- Dynamic ranger movement
- Obstacle interaction
The game follows a modular architecture with these key components:
GameObject: Base class for all game entitiesGameEngine: Core game logic and renderingLevel: Level management and loadingDatabaseManager: High score handlingYogiBearGUI: Main game window and controls
Joseph Paul