Repository navigation
Home
Choo Yi Jie edited this page Sep 5, 2024
·
4 revisions
Welcome to the PSC-python-hackathon-2024 wiki!
This project is a 2D platformer game developed using the Ursina game engine. The player controls a character that can move left, right, and jump across platforms. The objective is to climb as many platforms as possible, with the game dynamically generating new platforms as the player progresses. The game features a scoring system that tracks how many platforms the player has successfully climbed.
- Player Movement: The player can move left, right, and jump using keyboard or gamepad controls.
- Dynamic Platform Generation: New platforms are generated randomly as the player lands on the highest platform, ensuring continuous gameplay.
- Scoring System: The game tracks and displays the number of platforms the player has climbed
- Smooth Camera Follow: The camera smoothly follows the player, providing a seamless gameplay experience.
- Collision Detection: Accurate collision detection ensures the player interacts correctly with platforms and the ground.
| Keyboard | Role |
|---|---|
| left arrow / a | Move Left |
| right arrow / d | Move Right |
| up arrow / w | Jump |
| Gamepad | Role |
|---|---|
| D-Pad Left | Move Left |
| D-Pad Right | Move Right |
| A Button | Jump |
- Player Initialization: The player is initialized with a smaller scale and a box collider for accurate collision detection.
- Ground Segments: Multiple ground segments are created to simulate an infinite ground.
- Platforms: Initial platforms are created, and new platforms are dynamically generated as the player progresses.
- Scoring System: A scoring system tracks the number of platforms climbed and displays the score on the screen.
- Update Function: The update function checks if the player has landed on the highest platform and spawns new platforms accordingly.