Skip to main content

Testing framework for Xaya GSPs

Project description

Xaya Game Library

libxayagame is a C++ library that makes it easy to implement games on the Xaya platform. It takes care of the interaction with the Xaya Core daemon, so that game developers only have to implement the rules of their game.

mover is a simple game using this library, where players can move around an infinite plane. It is fully functional, although mainly meant as example and/or basis for more complex games.

Similarly, nonfungible is a simple implementation of non-fungible assets on the Xaya platform. It is useful as another example (of using the SQLite integration), for testing Democrit but also as an actual application on Xaya for issuing and trading fungible and non-fungible tokens.

This repository also contains a framework for game channels as well as Xayaships, which is an example game for channels.

Building

To build libxayagame and the example mover game, use the standard routine for building autotools-based software:

autogen.sh && ./configure && make

After a successful build, you can optionally run make check and/or make install to run tests and install the library and moverd on your system, respectively.

Prerequisites

libxayagame has a couple of dependencies which need to be installed for the configuration and/or build to be successful:

  • libjsoncpp: The Debian package libjsoncpp-dev can be used.
  • jsonrpccpp: For Debian, the packages libjsonrpccpp-dev and libjsonrpccpp-tools are not fresh enough. They need to be built from source; in particular, it must be a version that includes the commit 4f24acaf4c6737cd07d40a02edad0a56147e0713.
  • ZeroMQ with C++ bindings: Core ZeroMQ is available in the Debian package libzmq3-dev. The C++ bindings need to be installed from the source repository, as the version in the Debian package (at least for Debain 10 "Buster") is too old.
  • zlib: Available in Debian as zlib1g-dev.
  • SQLite3 with the session extension. In Debian, the libsqlite3-dev package can be installed. Alternatively, build from source and configure with --enable-session.
  • LMDB: Available for Debian in the liblmdb-dev package.
  • glog: Available for Debian as libgoogle-glog-dev.
  • gflags: The package (libgflags-dev) included with Debian can be used.
  • Protocol buffers are used both in C++ and Python. On Debian, the packages libprotobuf-dev, protobuf-compiler and python-protobuf can be used.
  • eth-utils, which itself depends on libsecp256k1. The latter is available on Debian as libsecp256k1-dev.

For the unit tests, also the Google test framework is needed. The package included with Debian 10 "Buster" is not fresh enough, it should be built and installed from source instead.

For running the integration tests based on Python, install Python3 and the dependencies listed in requirements.txt. It is recommended to use a virtual environment.

Docker Image

We also provide a Dockerfile, which can be used to build an image based on Debian that has all dependencies and libxayagame itself prebuilt and installed. (Hint: The file can also just serve as documentation for how to get all dependencies and build libxayagame yourself on a Debian system.)

Builds of this image are also published on Docker Hub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xayagametest-1.0.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xayagametest-1.0.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file xayagametest-1.0.1.tar.gz.

File metadata

  • Download URL: xayagametest-1.0.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for xayagametest-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ec2659e0794b4c69a7dcb2c1f24db7f9217d02695a15fb41a5a52b5c56284667
MD5 0b3f7208fd2f1814202fc64dd842cbb9
BLAKE2b-256 3f7ad328c9a6010b515f22c148378d566bbd0a32277e935d0a96b6f80aa8fc8e

See more details on using hashes here.

File details

Details for the file xayagametest-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: xayagametest-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for xayagametest-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d712cb549cc3085ac01e76cee82e75080a7997ef5c92db4110765d609e7a9a62
MD5 568c412af64b80d9f0f55ddd3f707d6e
BLAKE2b-256 f6f5a9732f8a85021f98fcc6556f70a05f3248ce1e133deda5f824adc0ad4f65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page