-
Notifications
You must be signed in to change notification settings - Fork 0
Audio
polyrain edited this page Aug 1, 2021
·
1 revision
Audio, e.g. Sounds and music files, can be easily added into the game using libgdx Sound and Music. There is no single audio service, instead audio can be played when and where needed once loaded by the ResourceService
.
-
Load sound: Ensure the sound file has been loaded in an active resource batch by the
Resource Service
usingloadSounds()
.
private static final String[] soundsToLoad = {"sounds/sound.ogg"};
resourceService.loadSounds(soundsToLoad);
-
Play sound: Retrieve the sound from the
Resource Service
usinggetAsset()
. Configure the playback settings, then useplay()
to play the file.
Sound sound = ServiceLocator.getResourceService().getAsset("sounds/sound.ogg", Sound.class);
sound.play();
-
Load music: Ensure the music file has been loaded in an active resource batch by the
Resource Service
usingloadMusic()
.
private static final String[] musicToLoad = {"sounds/music.mp3"};
resourceService.loadMusic(musicToLoad );
-
Play music: Retrieve the music from the
Resource Service
usinggetAsset()
. Configure the playback settings, then useplay()
to play the music. The following example is set to loop, and to play with volume at 30%.
Music music = ServiceLocator.getResourceService().getAsset("sounds/music.mp3", Music.class);
music.setLooping(true);
music.setVolume(0.3f);
music.play();
- 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