-
Notifications
You must be signed in to change notification settings - Fork 0
Camera tracking player
Dollar0712 edited this page Sep 21, 2021
·
5 revisions
This feature is designed to achieve the basic function of the camera to reasonably track the player. The camera shows the player a reasonable view of the screen as they move, giving them maximum access to the information within the game interface
The following function shows how the camera is moved according to the player's position. It is worth noting that the camera's position is refreshed according to the game's frame refresh, so this function needs to be called in the "render" in MainGameScreen.java
/**
* reset the camera position when refreshing every frame
* @param camera the CameraComponent of the map
*/
public void resetCam(CameraComponent camera) {
float playerX = player.getPosition().x;
System.out.println(playerX);
if (playerX >= 5 && playerX <= 35) {
camera.getCamera().translate(playerX - camera.getCamera().position.x + 5, 0,0);
camera.getCamera().update();
}
}
- Player UI
- Popup Menus
- Obstacles
- Boss Enemies
- Progress Tracker
- Checkpoint Design and Functionality
- Score System
- Lives System
- Game Background
- Multiple game-level
- Visual Improvements
- Tutorial Level
- Character Design and Animations
- Character Damage Animations
- Player Animation Functionalities
- Player and Serpent Portal Transition
- Pop-up Menus
- Obstacles
- Lives & Score User Testing
- Buffs & Debuffs
- Buffs & Debuffs redesign
- Obstacle Animation
- Background Design
- Level 2 Background Appearance
- Enemy Monster User Testing
- Level 1 Floor Terrain Testing
- Introduction Screens User Testing
- Character Movement Interviews & User Testing
- Sound user testing
- Level 2 Obstacles and enemy
- Story, Loading, Level 4 and Win Condition Sound Design User Testing
- Giant Bug and Purple Squid animation user testing
- General Gameplay and Tutorial Level User Testing
- Level 4 Terrain User Testing
- Game Outro User Testing