HUD

For the HUD, a library called “Themeable Widgets Library” is used. It provides basic widgets like frames, buttons and edit fields and it is themeable. At the moment, however, the connect-dialog and the connect button at the top of the screen are the only two things using this. This will change during further development of the game. It also allows mouse and keyboard events to “fall” through to our own code if the mouse doesn't hit a widget.

Understanding how to use the quite complex TWL framework was harder than expected. It depends on its XML based theme files more than I thought. Ideally, there is a corresponding entry in the theme file for every element used in the application.

Ground

The ground basically consists of a (irregular) grid of tiles. Although this is not really visible because at the moment sand is the only texture used, the implementation is quite flexible and complex. It uese TreeMaps to store the tiles because in a TreeMap, the Object can be stored with any index, allowing gaps and negative values. This makes it possible to vary the size of the tiles, which saves bandwidth when sending tile data and polygons when drawing.

Every few hundreds of pixels the camera has moved, the client asks the server for a tile-update for a certain area. For information on how tile information is sent to the client, see Network System.

 
 client/description/graphics.txt · Last modified: 2011/05/09 08:47 by armageddon
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Driven by DokuWiki