meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
jolla2014:group12:start [2014/03/13 21:49] – [The game] julaakko | jolla2014:group12:start [2014/03/14 10:36] (current) – [Info and ending] julaakko | ||
---|---|---|---|
Line 4: | Line 4: | ||
^ Group Member ^ Main Responsibilities ^ | ^ Group Member ^ Main Responsibilities ^ | ||
- | | Jussi Laakkonen | All and everything | | + | | Jussi Laakkonen |
====== Idea ====== | ====== Idea ====== | ||
Line 14: | Line 14: | ||
* Repairing (not impl) | * Repairing (not impl) | ||
* Ships have different amount of damage | * Ships have different amount of damage | ||
- | * Ships have different weapons that produce | + | * Ships have different weapons that make different amounts of damage |
+ | * < | ||
* Ships can move to another players territory where the ships are visible (not impl) | * Ships can move to another players territory where the ships are visible (not impl) | ||
- | | + | |
+ | * <del>Network support</ | ||
- | The screen size is enough for this kind of small strategy game, so it is doable. | + | The screen size is enough for this kind of small strategy game, so it is doable. |
+ | |||
+ | < | ||
====== Timetable ====== | ====== Timetable ====== | ||
^ Day ^ What to do ^ | ^ Day ^ What to do ^ | ||
^ Monday| Helping others, try the SDK | | ^ Monday| Helping others, try the SDK | | ||
- | ^ Tuesday| More bug fixing and support at codecamp, QML reading | | + | ^ Tuesday| More OS/SDK issue fixing and support at codecamp, QML reading | |
- | ^ Wednesday| Coding | | + | ^ Wednesday| Coding, C++ and QML integration |
- | ^ Thurday| Coding | | + | ^ Thurday| Coding, QML, QML, QML and a bit C++ to prevent insanity |
- | ^ Friday| A brief demo of the app | | + | ^ Friday| A brief demo of the app and reset of brains afterwards |
====== Motivation ====== | ====== Motivation ====== | ||
Line 48: | Line 52: | ||
repeat: false | repeat: false | ||
onTriggered: | onTriggered: | ||
- | pageStack.clear() // Clear stack | + | |
- | pageStack.push(Qt.resolvedUrl(" | + | |
- | // The gamedata is retrieved from C++ engine, so when turn changes, the main page will be set with another players data | + | pageStack.push(Qt.resolvedUrl(" |
+ | // The gamedata is retrieved from C++ engine, so when turn changes, the main page will be set with another players data | ||
+ | } | ||
} | } | ||
} | } | ||
Line 125: | Line 131: | ||
===== The game ===== | ===== The game ===== | ||
+ | |||
+ | ==== Game Area ==== | ||
* 9x16 grid of 60x60 blocks where the oil of the enemy will be shed | * 9x16 grid of 60x60 blocks where the oil of the enemy will be shed | ||
* Initially 9x48 where each player has a "safe harbour" | * Initially 9x48 where each player has a "safe harbour" | ||
* Enemy ships would be seen if moved past the halfway | * Enemy ships would be seen if moved past the halfway | ||
- | * Two player hotseat game, game notifies with a turn change and requests interaction | + | * Two player |
- | * Each player has 3 ships with different amounts of armor (if armor gets below 0 the ship is destroyed and cannot shoot anymore) and different weapon set | + | * When turn changes game reloads the placing/ |
+ | |||
+ | ==== Ships ==== | ||
+ | |||
+ | * Each player has 3 ships with different amounts of armor (if armor gets below 0 the ship is destroyed and cannot shoot anymore) and a different weapon set | ||
^ Type ^ length ^ armor ^ weapons ^ | ^ Type ^ length ^ armor ^ weapons ^ | ||
Line 141: | Line 153: | ||
* < | * < | ||
* Ships cannot overlap each other | * Ships cannot overlap each other | ||
+ | |||
+ | ==== Shooting ==== | ||
+ | |||
+ | |||
* On each turn player can select a ship which to use and to shoot the player must select a weapon | * On each turn player can select a ship which to use and to shoot the player must select a weapon | ||
* Different weapons (2 weapons/ | * Different weapons (2 weapons/ | ||
Line 150: | Line 166: | ||
| Machine gun | 10 | | | Machine gun | 10 | | ||
- | * When shooting player' | + | |
- | * At the enemy harbour view the player can select a coordinate which to shoot. Previous shots are shown as: | + | |
+ | * At the enemy harbour view the player can select a coordinate which to shoot. Previous shots are shown as (also on own harbour view): | ||
* Red: There was something player hit | * Red: There was something player hit | ||
* Green: Miss | * Green: Miss | ||
* Black: Destroyed a ship that occupied the coordinate | * Black: Destroyed a ship that occupied the coordinate | ||
- | * Player can shoot multiple times into one position, hence the amount of armor | + | * Player can shoot multiple times into one position, hence the amount of armor on the ships (this is not) |
* Player can also cancel the shooting by selecting previous page from the page stack | * Player can also cancel the shooting by selecting previous page from the page stack | ||
* Player can cancel the turn by selecting the item from the pulldown menu | * Player can cancel the turn by selecting the item from the pulldown menu | ||
+ | |||
+ | |||
+ | ==== Info and ending ==== | ||
+ | |||
* During gameplay, player gets some information on the screen about the selected ship (name, armor, weapons) - a crude text-element. The player is also informed at the shooting screen about the shot result and is then transferred back to a) own harbour (navigate back) b) player change screen (clear pagestack and push anew page) depending on the game state | * During gameplay, player gets some information on the screen about the selected ship (name, armor, weapons) - a crude text-element. The player is also informed at the shooting screen about the shot result and is then transferred back to a) own harbour (navigate back) b) player change screen (clear pagestack and push anew page) depending on the game state | ||
* The game ends when other player has destroyed all of the enemy ships and winner is shown on separate screen (game cannot be closed using the button - don't know how to do it yet) | * The game ends when other player has destroyed all of the enemy ships and winner is shown on separate screen (game cannot be closed using the button - don't know how to do it yet) | ||
Line 200: | Line 221: | ||
====== Project report ====== | ====== Project report ====== | ||
+ | TBD | ||
====== Source ====== | ====== Source ====== | ||
Line 206: | Line 227: | ||
{{: | {{: | ||
+ | |||
+ | ====== Comments ====== | ||
+ | |||
+ | The usage of C++ in QML was eventually easy but my way may not be the best. It is also possible to use QObjects in the QML and then you should not need to use one big instance that you call everytime. When the object is inherited from QObject type it is possible to, e.g.: <code c++> property QObject object: GameEngine.getShip(" | ||
+ | object = GameEngine.getShip(" | ||
+ | |||
+ | Do not pass 8bit integers from Qt C++ to QML - it does not seem to be counting the bits correctly and the 8bit values are shown as negative integers in QML. Might be an issue with signed/ | ||
+ | |||
+ | Element visibility is a nice feature that every QML object seems to have, it is not putting itself on top of any other object while hidden but it is completely untouchable - I will use this in future version of the game to give a full screen popup when a ship is clicked. The popup will give detailed information about the ship: name, history, weapons, ammo count, speed, size, strength (armor), etc. For example:< | ||
+ | Rectangle { | ||
+ | id: box1 | ||
+ | visible: GameEngine.getGameState() === 0 ? false : true // Would set the box visible only when game is not in state 0 | ||
+ | }</ |