-
Notifications
You must be signed in to change notification settings - Fork 4
ChooserGUI_Implementation
The integration of background music chooser GUI into code involves making a music icon which will be shown on each screen. Clicking on the music icon will open a dialog containing two radio buttons with background music names. The choice of the user will be persisted in local storage. The user should also be given an option to disable background music for a particular screen.
BackgroundSelectionComponent.java: Location
The idea of creating a reusable BackgroundSelectionComponent
is that it can be attached to the lifecycle of the UI entities of all the screens and there is minimal technical debt when it comes to adding new background music. In this guideline, we will focus on the UI side of things. This reusable component accepts two props:-
Property | Type | Description |
---|---|---|
Screen name | String (any) | The name of the screen. This name is displayed in the dialog box that opens. It also maps to the backgroundMusic.json file which contains the list of background music files for that particular screen. |
Position | String ('tl', 'tr', 'bl', 'br') | Accepts the position where the music icon should be placed. 'tl' - Top left 'tr' - Top right 'bl' - Bottom left 'br' - Bottom right |
Usage:
addComponent(new BackgroundSelectionComponent("Achievements", "br"))
Inner implementation of the position prop:
switch (iconPosition) {
case "tl":
musicSelectionTable.top().left();
break;
case "bl":
musicSelectionTable.bottom().left();
break;
case "br":
musicSelectionTable.bottom().right();
break;
default:
musicSelectionTable.top().right();
}
musicSelectionTable.add(musicImgBtn).size(120, 120);
Clicking on the music icon opens the dialog which contains a dialog and two radio buttons with background music track names.
mage musicImg = new Image(ServiceLocator.getResourceService()
.getAsset("images/settings/musicSelectionButton.png", Texture.class));
ImageButton musicImgBtn = new ImageButton(musicImg.getDrawable());
musicImgBtn.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
showMusicDialog();
}
});
Clicking on a radio button or track in the dialog box plays the track selected as preview, and at the same time persists the choice, clears the table and then re-renders the table to update the radio button state.
private Table getTrackTable(String trackPath, boolean selected) {
String songName = getSongName(trackPath);
Table table = new Table();
table.add(getRadioButton(selected)).size(50, 50);
table.add(getLabel(songName)).width(350);
table.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
BackgroundMusic.selectMusic(screenName, trackPath);
entity.getEvents().trigger("changeSong", trackPath);
dialog.getContentTable().clear();
renderTracks();
}
});
return table;
}
Camera Angle and The Player's Perspective
Achievements Trophies and Cards
πΎ Obstacle/Enemy
βMonster Manual
βObstacles/Enemies
ββ- Alien Plants
ββ- Variation thorns
ββ- Falling Meteorites
ββ- FaceHugger
ββ- AlienMonkey
βSpaceship & Map Entry
βParticle effect
[code for debuff animations](code for debuff animations)
Main Character Movement, Interactions and Animations - Code Guidelines
ItemBar & Recycle system
πΎ Obstacle/Enemy
βObstacle/Enemy
βMonster Manual
βSpaceship Boss
βParticle effects
βOther Related Code
βUML & Sequence diagram of enemies/obstacles
Scoring System Implementation Explanation
Buff and Debuff Implementation
Infinite generating terrains Implementation Explanation
Game Over Screen and functions explaination
Buffer timer before game start
Rocks and woods layout optimization
Magma and nails code implementation
Guide: Adding Background music for a particular screen
History Scoreboard - Score Details
Listening for important events in the Achievements ecosystem
Hunger and Thirst icon code guidelines
Hunger and Thirst User Testing
Buff and Debuff Manual User Testing
The New Button User Test in Setting Page
The Main Menu Buttons User Testing
Infinite loop game and Terrain Testing
https://github.com/UQdeco2800/2021-ext-studio-2.wiki.git
πΎ Obstacle/Enemy
βObstacle testing
ββ- Alien Plants & Variation Thorns
ββ- Falling Meteorites
βEnemy testing
ββ- Alien Monkeys & Facehugger
ββ- Spaceship Boss
βMonster Manual
βParticle-effect
βPlayer attack testing
ββ- Player Attack
Sprint 1
Sprint 2
Sprint 3
Sprint 4
Changeable background & Buffer time testing
Game over screen test sprint 4
New terrain textures on bonus map test sprint 4
Achievements System, Game Records and Unlockable Chapters
Musics Implementation Testing plan