MovingBlocks
Make Floating Text Disappear when Behind Obstacles
At the moment FloatingTextComponent
is visible through the world. In some cases, this is not helpful and a lot of floating text can clutter the screen. The task is to add a flag to the FloatingTextComponent
called isOccluded
that allows text to hidden if it's obscured by something in front of it.
The Minesweeper mod is one such case. Each numbered block that is mined leaves a floating number. This both clutters the game and makes finding mines a frustrating challenge. Once you have added the flag it should be enabled for the FloatingTextComponents
in this repo.
Definition of 'Done'
- Tweak Renderer so text is hidden behind other objects in the scene
- A screenshot attached demonstrating that the text is obscured correctly ( You can use the Minesweeper mod to demonstrate this.)
- Pull request submitted to the Terasology repo
- Pull request submitted to the Minesweeper repo
Where to start
- Add a boolean flag to the FloatingTextComponent called
isOccluded
- Modify FloatingTextRenderer so that the
isOccluded
flag is taken into account. - Look under MinesweeperSystem at the
onCounterDestroyed
method
See also
- Opengl Khronos Spec
- Look for
GL_DEPTH_TEST
- Look for
glEnable
- Look for
- Terasology engine repo
FloatingTextComponent.java
FloatingTextRenderer.java
- MineSweeper Module
MinesweeperSystem.java
Task tags
Students who completed this task
eviltak