Skip to content

Latest commit

 

History

History
223 lines (117 loc) · 11.2 KB

README.md

File metadata and controls

223 lines (117 loc) · 11.2 KB

Overview

XAYA provides a convenient solution for developers to put their games up to 100% on the blockchain. The following materials can help you get started quickly.

Prerequisites

Before you get started, there are some basic prerequisites, e.g. get a wallet, CHI, etc.

GO! GOTO Prerequisites

Getting Started

Once you've got the prerequisite downloads, the following will provide you with some background information and techniques that will be useful for when you start some code tutorials.

Getting Started with Background Information

Before you get started, you should be somewhat familiar with what a blockchain is. If not, please read Blockchain Basics.

GO! GOTO Blockchain Basics

Reading the XAYA Specifications will give you a high-level overview and familiarise you with various concepts and details. This is highly recommended reading and is considered reference material.

GO! GOTO XAYA Specifications

Wallets are critically important. Read the Wallets section of the XAYA Electron wallet help for a quick high-level overview if you're not already familiar.

GO! Wallets

Some tutorials use the XAYA Command Line Interface (xaya-cli). Read up on xaya-cli here.

GO! GOTO Getting Started with xaya-cli

Next, read about XAYA RPC Methods. You'll need to know how to send RPC calls to the XAYA daemon. This will get you up to speed quickly.

GO! GOTO XAYA RPC Methods

The libxayagame Component Relationships shows you the basic architecture. It details how your game logic and front end interact with XAYA.

GO! GOTO libxayagame Component Relationships

Getting Started with Coding

Now that you've familiarised yourself with some basics for XAYA, it's time to get coding.

The "How to Wire Up libxayagame in C#" is a minimalist tutorial that shows how to wire up XAYA very quickly.

GO! GOTO How to Wire Up libxayagame in C#

Start with Hello World. It includes a fully functional example project and several videos. In this tutorial, you'll learn how to wire up a working XAYA game. This tutorial does not have any significant game logic, which makes it very easy to follow.

GO! GOTO Hello World!

Next, read the Mover Overview, then try one of the Mover tutorials. The console MoverSharp tutorial demonstrates simple game logic, but does not get into updating the front end. The Mover in Unity tutorial goes over much of the same material as the console version, but adds in updating the front end.

GO! GOTO Mover Sample Game Overview

GO! GOTO Mover Sharp - A C# Implementation

GO! GOTO Mover Sample Game in C# with Unity

Getting Started with Developer Support

If you have questions, visit the XAYA Development forum. You can ask questions and get answers there.

Guides and Tutorials

For game developers, this is the first place you should look to get started with XAYA game development. The sections below are loosely arranged in order. You can read them from top to bottom, but feel free to skip around.

Additional resources will be added on an ongoing basis.

Blockchain Basics

If you're unfamiliar with blockchain technology, Blockchain Basics will give you a quick overview and highlight some important aspects. This is a quick, high-level overview and far from exhaustive. If you are already familiar, you should skip this.

GO! GOTO Blockchain Basics

XAYA Specifications

The XAYA Specifications repository contains technical specifications and design documents that describe how the various components and layers in the ecosystem interact. In particular, important topics are:

The specifications are required reading. Other documents will refer to specific sections of the specifications.

GO! GOTO XAYA Specifications

XAYA RPC

XAYA uses RPC (Remote Procedure Calls) to communicate with the XAYA daemon (xayad). The daemon contains many of the same methods that you may already know from Bitcoin. It also contains methods unique to XAYA. The documents here will help you with those unique methods and provide some additional guidance on their purpose.

XAYA is language agnostic, so you can use any language you wish so long as it is capable of making RPC calls.

XAYA RPC Methods

The XAYA RPC Methods document describes several of the most useful RPC methods and provides examples. It is language agnostic and you should read this first.

GO! GOTO XAYA RPC Methods

RPC Windows C# Tutorial

The RPC Windows C# Tutorial uses a 3rd party library to demonstrate using several XAYA RPC methods. A sample Windows Forms application is provided with comments to assist you.

GO! GOTO RPC Windows C# Tutorial

libxayagame

The libxayagame library lets developers focus on building blockchain games without worrying about any of the inner workings of the blockchain, such as reorgs. That is, libxayagame does some very, heavy, heavy lifting for you.

Instead, it provides a simple framework for you to code your games on top of the XAYA platform.

Once you have libxayagame wired up, you only need to implement 3 callback methods. The Mover example shows you how to do this.

Code ninjas and rock stars may enjoy browsing through the code or code documentation available here.

GO! GOTO libxayagame

Component Relationships

This tutorial provides a high-level overview of the component relationships and information flows when using libxayagame. While it aims to explain the Mover sample game, other scenarios are briefly outlined.

GO! GOTO libxayagame Component Relationships

How to Wire Up libxayagame in C#

This very short tutorial explains how to add libxayagame to a project.

GO! GOTO How to Wire Up libxayagame in C#

Hello World!

This is a step-by-step "Hello World!" tutorial and a good place to start.

GO! GOTO Hello World!

Mover Sample Game Overview

Mover is an extremely simple game that uses the libxayagame library. The goal of Mover is to help you easily build your game.

Both libxayagame and Mover are written in C++. The Mover sample includes a game test written in Python. For more information, see the Mover Sample Game Overview tutorial.

GO! GOTO Mover Sample Game Overview

Mover Sharp - A C# Implementation

MoverSharp is a truncated C# implementation that does not allow user input. It merely displays moves.

This tutorial illustrates how libxayagame is wired up for Mover and then explores game logic on the XAYA platform.

GO! GOTO Mover Sharp - A C# Implementation

Mover in Unity

For C# developers, the Mover example has been ported to C# along with code to wrap the libxayagame C++ library.

The Unity project provides a front-end GUI for Mover. The wrapper and additional code implement the Mover game itself.

GO! GOTO Mover Sample Game in C# with Unity

Regtestnet

Regtestnet is what you should primarily use during development instead of mainnet or testnet. At some point you may wish to move your testing to testnet, but that shouldn't be your first choice.

The regtest option gives you a private XAYA network where you have complete control.

You can instamine CHI at will and control exactly when and how blocks are mined. You can invalidate blocks, and undo that.

See the "Getting Started with Regtestnet" tutorial for more information.

GO! GOTO Getting Started with Regtestnet

Getting Started with xaya-cli

The XAYA Command Line Interface (xaya-cli) lets you easily interact with the XAYA daemon and XAYA wallets. It's used extensively in various tutorials. This tutorial introduces xaya-cli and gives examples that you can practice with to learn it very quickly.

GO! GOTO Getting Started with xaya-cli

XAYA Electron Wallet Help

This is end user documentation for the XAYA Electron wallet.

GO! GOTO XAYA Electron wallet help