The Images directory
Prev
Next

The Images directory

This directory contains the buttons of the game, the map and the sprites subdirectory.

The map.png file

This is just a png file representing the map of the skins's world. Countries can have arbitrary shapes, but should be grouped in eye-recognizable continents, by location only or by color.


A sample map

The map-mask.png file

This is a png file representing also the map of the skins's world, but with coded colors that allow to identify uniquely.each country. Countries must have at least the same shapes as the corresponding countries on the map.png file so that users can click anywhere in a viewable country and select the good one. Countries, like little islands as Indonesia in the default map can be greater than the equivalent in the map.png file to facilitate the selection of the country.


A sample map-mask

The blue component (in RGB model) of a country's color identifies the country: index 0 is country 0 in the onu.xml file, index 1 is country 1, etc. White (0xFFFFFF in RGB) identifies the absence of country (sees or, why not, no man's lands).

The buttons images

All commands apart countries selection are triggered by the buttons, so they should be easily understandable, even if tooltips and "what's this" help to identify them. In the current version, they are inserted in a KDE toolbar and thus adopt the size of the toolbar. They should be created large enough to allow a good scaling at whatever final size. The filenames are hard-coded in the code, so they should not be modified. The table below shows all the buttons that should be provided, in the order in which they appear in the toolbar, knowing that the buttons are diplayed and hided when necessary.

Table 5.3. The buttons of the GUI

ImageFilnameSignification


quitter.pngQuit the game. Asks if the current game should be saved


nouveauJeu.pngCreates a new game. Asks if the current game should be cancelled


newNetGame.pngTries to join a network game


aide.pngShould open the help document. Currently, it only opens the about data dialog box


ouvrirJeu.pngOpens a saved game


saveGame.pngSaves the current game to file


annuler.pngCancels the current ongoing action


distributionArmees.pngAfter all players have put their armies, it is possible to modify the distributions (named recycling). This button asks to do such a redistribution


distributionArmeesFinie.pngChooses not to redistribute. All clients windows must have this button clicked to really end the distribution


joueurSuivant.pngEnds the current player's turn and switch to the next one or to the next turn if the current player was the last one


attackOne.pngChooses to start an attack with one army


attackTwo.pngChooses to start an attack with two armies


attackThree.pngChooses to start an attack with three armies


defendOne.pngChooses to defend an attacked country with one army


defendTwo.pngChooses to defend an attacked country with two armies


moveArmies.pngChooses to start the moving of armies between two countries (last action in the turn)


moveOne.pngChooses to move one army from the previously chosen source country to the target country


moveFive.pngChooses to move five armies from the previously chosen source country to the target country


moveTen.pngChooses to move ten armies from the previously chosen source country to the target country


moveFinish.pngChooses to end the moving of armies at invasion or moving time


moveBackOne.pngChooses to retract one army from the target country and put it back in the source country during armies moving or invasion


moveBackFive.pngChooses to retract five armies from the target country and put it back in the source country during armies moving or invasion


moveBackTen.pngChooses to retract ten armies from the target country and put it back in the source country during armies moving or invasion

The sprites directory

This directory contains the image files of the sprites used by the game. In the default skin, these are flags, infantry, cavalry and cannon. Infantry reprents one army, five for cavalry and ten for cannons. Cannons are also used to display ongoing battles. That's why there is three kinds of cannon sprites: normal static or moving cannon, firing one and exploding one.

Each sprite image is the concatenation of the various views of the object and for each view, its frames. Views are organized vertically and frames horizontally. Where to cut the image in individual frames is found bye dividing the height of the image by the number of views and the width by ne number of frames. These data are found in the onu.xml file.


An example of a sprite image: cannon.png

For armies sprites, there is three different views, from top to bottom: looking right, looking left and face. For flags, there is only one view. All sprites backgrounds should be set to transparent.


An example of a flag sprite image: italy.png

Prev
Next
Home