| 1 |
Persistent Memory Development Kit |
| 2 |
|
| 3 |
This is examples/libpmemobj/pminvaders/README. |
| 4 |
|
| 5 |
This directory contains two variants of an example application implemented |
| 6 |
using libpmemobj, it's a simple game in which all the objects are stored |
| 7 |
on persistent memory. This means that the game process can be safely killed |
| 8 |
and then resumed. |
| 9 |
|
| 10 |
The first implementation of the game demonstrates the usage of the very |
| 11 |
basics of the pmemobj library, that includes the pool management |
| 12 |
(open/create/close), type-safety macros, atomic (non-transactional) allocations |
| 13 |
and internal collections. |
| 14 |
|
| 15 |
The second version is fully based on the transactional API and does not |
| 16 |
use internal pmemobj collections. |
| 17 |
|
| 18 |
To launch the game: |
| 19 |
./pminvaders [game session file] |
| 20 |
or: |
| 21 |
./pminvaders2 [game session file] |
| 22 |
|
| 23 |
The file with the game session will either be created if it doesn't exist |
| 24 |
or opened if it contains a valid pool. |
| 25 |
|
| 26 |
Controls: |
| 27 |
move (left/right) - 'o' / 'p' or arrow keys |
| 28 |
shoot - spacebar |
| 29 |
quit - 'q' |
| 30 |
|
| 31 |
If you want to run this demo on non-pmem storage, set the PMEM_IS_PMEM_FORCE |
| 32 |
environment variable, so that the library does not issue msync calls. |
| 33 |
|
| 34 |
** DEPENDENCIES: ** |
| 35 |
In order to build both variants of the game you need to install ncurses |
| 36 |
development package. |
| 37 |
|
| 38 |
rpm-based systems : ncurses-devel |
| 39 |
dpkg-based systems: libncursesX-dev (where X is the API/ABI version) |