Git Product home page Git Product logo

expanse's Introduction

alt tag

Horizon Expanse

Discord

What is it?

Expanse is a project which aims to completely replace minecraft's networking internals with SpatialOS to allow infinite worlds with near infinite people.

How does it work?

The traditional ways to develop large online games mean that you’re either limited by the capacity of a single game server, or you have to shard your game world.

alt tag

SpatialOS works differently: it brings together many servers so they’re working as one. But it does this in a way that makes a single world which looks seamless to players.

alt tag

Images from SpatialOS documentation

How can I contribute? Open Source Helpers

Prerequisites

Hardware Requirements

Minimum Recommended
Processor i5 i7
Memory 8GB 16GB
Network Any broadband internet connection High-speed broadband internet connection
Storage 12GB available space 12GB available space

Set up environment

Any missing information will be found here

run spatial worker build to set up the worker SDKs

expanse's People

Contributors

bluexin avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

expanse's Issues

Basic world generation (primers)

Chunks should be generated as needed to send to the clients.

Maybe having a higher area than view distance (aka player's Entity Interest range) would be better, so chunks generate before the client needs them.
Should make sure the generation is spread across workers.
This does not include chunk decoration (trees, plants, structures, ...)

Command Worker

Global worker which is responsible for the running of commands.

Only receive updates for components a worker is interested in

This is for far into the future, I'm just posting it here not to lose track of it.

Currently all workers receive updates for all components of all entities within their interest range.
To reduce bandwidth and memory usage, they should only receive updates for components they are interested in.
Sorting out how exactly to do this will make it easier to apply to existing and new workers.
Docs on Entity Interest
Docs on Component Delivery
Docs on Query-Based Interest (QBI)

For example, the chunk updater shouldn't really care about a mob's AI target.

Manage MC Dimensions

MC Dimensions could be managed by using separate deployments and transitioning between them.
See this forum post (although we might not need to go into such details, unless we want to render see-trough portals or something).

Issue with managed workers

    exit status 1
Exception in thread "main"
net.minecraftforge.fml.relauncher.FMLSecurityManager$ExitTrappedException
        at net.minecraftforge.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:49)
        at java.lang.SecurityManager.checkExit(Unknown Source)
        at java.lang.Runtime.exit(Unknown Source)
        at java.lang.System.exit(Unknown Source)
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:138)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        at com.hrznstudio.spatial.SpatialLaunchWrapper.main(SpatialLaunchWrapper.java:17)```

Basic chunk decoration

After getting primed, chunks should be decorated (trees, plants, ...)
If structures is to much work for this, it should be split to a separate issue when investigating implementation.
Using vanilla chunk loading safety mechanisms is fine (decorating at x and y + 8, to avoid cascading)

Mixins not loaded for pure workers

The mixins aren't getting loaded for pure workers (not loading the whole game).
They are needed to fix the connection lag in the SDK.

World unloading

We only want the world to be loaded, generated and updated in relevant parts (around players and "chunk loading" to allow for "hot spots" like spawn area).
To achieve this, we need to find solutions to :

  • determine the range of interest
  • save entities (SpatialOS entities, including our version of MC Chunks)
  • load entities

We can have a much higher range compared to vanilla, but we still can't have it be infinite.

Player Syncing

Need to make it so player movements sync to the server and are received on clients

Optimize chunk storage

We could have chunk data look closer to what it looks like in mc, holding much tightly-packed arrays.
Of course, chunks with only air shouldn't be stored.

Chunk Syncing

Chunks need to be split into sections of 16x16x16 and synced to and from client workers

World Loading

Currently, on connection the gui just hangs around saying connection successful, we need to implement a way of loading a world which is set to sync to spatial.

error, when compile

$ spatial worker build

Generating bridge settings for ChunkWorker.
Generating bridge settings for HorizonClientWorker.
Generating bridge settings for HorizonJavaWorker.
No changes detected, skipping code generation.
Running task 'build' for 'ChunkWorker'
[1/2] > Build Codegen
[1/2] > Codegen Dependencies
[1/2] < Codegen Dependencies (20ms)
[2/2] > Codegen Java
No changes detected, skipping code generation.
[2/2] < Codegen Java (40ms)
[1/2] < Build Codegen (60ms)
[2/2] > Build Gradle

FAILURE: Build failed with an exception.

  • Where:
    Build file 'expanse/workers/java/worker/build.gradle' line: 14

  • What went wrong:
    A problem occurred evaluating project ':worker'.

org.gradle.api.internal.TaskOutputsInternal.dir(Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskOutputs;

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s
Encountered an error running command: 'gradle' with arguments 'jar linux_assembly windows_assembly macOS_assembly': exit status 1
Please make sure the step 'Gradle' defined in file 'expanse/workers/java/spatialos.java.build.json' is configured correctly.
[2/2] x Build Gradle (1.89s)
error: exit status 1
failed (1.95s)
Error during command execution: exit status 1
'spatial worker build' failed (2.0s)
Encountered an error during command execution.
exit status 1

Abstract away a MC Chunk-aware view/dispatcher

Currently, the ClientView is used so clients can get access to MC Chunks, indexed on the chunk's position (for quick querying).
We should make a common view to be used by any worker in need of such info, and make sure there is no client-specific code in it.

Unreliable components updates

This is for far into the future, I'm just posting it here not to lose track of it.

SpatialOS has a feature called unreliable components updates/quality of service.
Basically, it is used to mark some components to not be an essential requirement for correct service, which means their updates syncing can be delayed in case of network overload for example.
This way, you give priority to the essential parts, to prevent the whole thing from falling apart.

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.