Game Development Reference
In-Depth Information
After this, make the following changes to the same class:
@Override
public void create () {
// Set Libgdx log level
Gdx.app.setLogLevel(Application.LOG_DEBUG);
// Load assets
Assets.instance.init(new AssetManager());
// Start game at menu screen
ScreenTransition transition = ScreenTransitionSlice.init(2,
ScreenTransitionSlice.UP_DOWN, 10, Interpolation.pow5Out);
setScreen(new MenuScreen(this), transition);
}
Summary
In this chapter, you learned how to manage screen transitions in a generic way by
separating the implementation details of the transition effects from the actual screens
that should be rendered. You learned about OpenGL's FBOs, which allow you to
render multiple screens to in-memory textures (RTT). Then, with the knowledge
gained on how to use FBOs, we created a screen transition system that can apply any
kind of transition effect while being completely independent of the screen's contents.
We used LibGDX's Interpolation class, which comes with a pool of 13 ready-
to-use interpolation algorithms. Finally, we discussed and implemented the three
transition effects.
In the next chapter, you will learn how to create sound effects using several sound
generators. Furthermore, we will add background music and create an audio
manager using the LibGDX Audio API to easily manage music and sound effects
in the game.
 
Search WWH ::




Custom Search