Editing Miniature/Development/Architecture

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 16: Line 16:
* Board - Represents the data structure of the board (duh)
* Board - Represents the data structure of the board (duh)
** Can draw a position based on a valid FEN string, say "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" encodes the start position.
** Can draw a position based on a valid FEN string, say "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" encodes the start position.
-
** How it works: Each piece is a QGraphicsSvgItem. This is useful since it allows fingertouchability. The board draws its position, meaning it hides all its piece children. It then asks the pieces pool manager for new pieces (the pool manager of course caches the QGraphicsSvgItems). The pieces are moved to the correct board position, and are made visible (again).
+
** How it works: Each figure is a QGraphicsSvgItem. This is useful since it allows fingertouchability. The board draws its position, meaning it removes all its figures children (by deletion) and then re-reads the SVG files into new QGraphicsSvgItem. Needless to say, this is inefficient. A better way would be to let the board load all figures during its construction time, put them in a vector (using enums for the indices lookup, maybe) and instead of clearing the board by deletion, just unparent the figures from the board, then reparent them into the correct position. Or just move them around, and hide those that were removed by game moves. Both should be easy and bring a good speed-up (SVG loading is quite expensive I hear). It is bascially about killing unneeded new/delete sequences.
* Player - information about the other player, like online status, skill level
* Player - information about the other player, like online status, skill level
** Player "cards" would be part of this. The player info section on top of the board is fully editable with the Qt Designer, and we could need a good clock ...
** Player "cards" would be part of this. The player info section on top of the board is fully editable with the Qt Designer, and we could need a good clock ...

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)

Templates used on this page: