Code Monkey home page Code Monkey logo

niwrad's Introduction

niwrad

Acquire activation file Build project

demo demo

See related writings:

How it works

Nakama is used for network communication, kubernetes coordination & other stuffs.

Architecture

Simulate physics is hard. Unity does it decently.
It's easier to just use Unity for that instead of the Nakama server.

high-level architecture

Nakama is used as a coordinator which spawn kubernetes nodes that handle each a specific box of the map.
In other words a sharding strategy is used for the distributed system.
An Octree data structure is used for that.

Features & direction

  • Hosts (any life form) have characteristics.
  • Hosts can reproduce (sexual only atm), when they do, their characteristics are "mixed" plus a slight randomness (mutation).
  • Hosts behaviour code MUST be generic, so we can either implement simple heuristics like state-machines, behaviour trees or more complex like reinforcement learning.
  • Hosts will evolve by natural selection, some characteristics that help survival (speed ... ?) will increase, some that harm survival will decrease.
  • Players can trigger artificial selection, e.g. like we human selected the cows that produce the most milk, the goal is to implement actions that offer the possibility to influence evolution. Currently what came to my mind: any way to protect, harm, heal, feed ... some targeted hosts (high speed hosts ? big hosts ...)

Usage

git clone https://github.com/louis030195/niwrad

Prerequisites

Deployment

  1. Docker
  2. Install kubectl
  3. Install helm
  4. Install minikube (for local k8s)

Client

  1. Unity
  2. make: sudo apt install make
  3. protoc, protoc-gen-go, protoc-gen-csharp (optional)
usage: make [target] ...

targets:
help                               Display this help
build-client-artifact              Build unity client
build-server-artifact              Build unity server
build-unity-image                  Build unity server docker image
build-js-image                     Build js client docker image
build-integration-tests-image      Build integration tests docker image
build-nakama-image                 Build nakama docker image
build-proto                        Build protobuf stubs
deploy                             Deploy cluster
un-deploy                          Un-deploy cluster
client                             Run client
test                               Run unit tests and integration tests

So you can try by deploying cluster & runnning client:

make deploy
make client

TODO

  • [Medium] Unit testing Unity.
  • [Medium] Helm integration tests.
  • [stale, Nakama-js doesn't support protobuf] [Medium] JS client for bots and testing.
  • [Easy] Implement "robot": a creature that will tweak evolution according to our will, e.g. "I want fast animals" it will kill all slow animals
    Basically anything that can allow players to apply artificial selection
  • [Easy] finish github workflow (github page deployment)
  • [Easy] Android controller
  • [Easy] Deploy persistent, resilient, fenced server on the cloud
  • [Medium] Consider adding predators / parasites in order to trigger competition e.g. Red Queen hypothesis
  • [Easy] Consider splitting in multiple repositories each component (Nakama, Unity, APIs: js) especially if things grows too much
  • [Easy] Consider using lua and/or go but if both, both should always use protobuf messages, no json !!!

niwrad's People

Contributors

louis030195 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.