One‐Way Cloud Platforms - UQcsse3200/2026-studio-1 GitHub Wiki
Overview
Level 2 uses one-way cloud platforms that behave differently from ordinary solid platforms. The player can jump upward through a cloud platform and land on its upper surface while descending.
This behaviour is limited to the cloud platforms in Level 2. Solid platforms in Levels 1 and 3 retain their normal collision behaviour.
Implementation
The map system defines a dedicated ONE_WAY_PLATFORM collision type and tile type. When Level 2 is loaded, cloud-platform tiles create one-way platform entities instead of ordinary solid floor tiles.
The physics contact listener disables collision while the player is moving upward from beneath a cloud platform. Collision remains active when the player is descending onto or standing on the platform.
Relevant implementation areas include:
CollisionTypeTileTypeMapDataLevelViewMapValidatorObstacleFactoryPhysicsContactListenerPhysicsLayerlevel2.json
Testing
Automated tests cover:
- One-way platform entity creation
- Collision and tile-type classification
- Level 2 map loading and validation
- Physics-contact behaviour
The feature was also manually tested to confirm that:
- The player can jump through a Level 2 cloud platform from below.
- The player lands on the platform while descending.
- Level 1 and Level 3 solid platforms cannot be jumped through.