Giter Club home page Giter Club logo

hiro's Introduction

Hiro

The server interface for the Hiro game framework.

Hiro is a client and server framework built on top of Nakama server to rapidly build high performance, flexible, and composable gameplay systems like Achievements, Energies, Event Leaderboards, and much more.

The code is divided into a Go package of interfaces and a C# DLL which is packaged with utilities (such as UnityPurchasing, Unity Mobile Notifications, etc) for Unity Engine.

This repository maintains the public interfaces which make it easy to use the library from inside a Nakama game server project to extend and build additional gameplay systems.

To learn more about Hiro and integrate it into your Unity game project, have a look at these resources:

Reach out to Heroic Labs for more information about how to license Hiro as a developer or as part of a game studio.

Setup

  1. Set up the Go toolchain.

  2. Set up your Nakama project with Go.

  3. Add Hiro to your project as a dependency:

    go get "github.com/heroiclabs/hiro@latest"
  4. Sign up to the Heroic Cloud and contact us to obtain licenses to Hiro.

  5. Download and unzip the package. Add "hiro.bin" to your codebase.

  6. Follow the usage instructions for how to get started.

Usage

The game framework initializes and returns the configured gameplay systems with Init:

func InitModule(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, initializer runtime.Initializer) error {
	systems, err := hiro.Init(ctx, logger, nk, initializer, "hiro.bin", "LicenseKey"
		hiro.WithEconomySystem("economy.json", true),
		hiro.WithEnergySystem("energy.json", true),
		hiro.WithInventorySystem("inventory.json", true))
	if err != nil {
		return err
	}

	// systems.GetEnergySystem().Get(...)
	// ...

	return nil
}

For examples on how to write data definitions for the gameplay systems have a look at the documentation.

License

This codebase is licensed under the Apache-2 License.

hiro's People

Contributors

novabyte avatar zyro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.