Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add some documents #72

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: csharp
dotnet: 2.0.0
mono: none
script:
# build
- cd ./src
- dotnet restore
- dotnet build -c TravisCI
# test
- cd ../tests
- dotnet test
# docker build
- cd ../src/MineCase.Gateway
- dotnet publish -c TravisCI -o obj/Docker/publish
- docker build -t minecase.gateway .
- cd ../MineCase.Server
- dotnet publish -c TravisCI -o obj/Docker/publish
- docker build -t minecase.server .
# docker push
- docker tag minecase.gateway sunnycase/minecase.gateway:ci-latest
- docker tag minecase.server sunnycase/minecase.server:ci-latest
- >
if [ "$TRAVIS_BRANCH" == "master" ]; then
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
docker push sunnycase/minecase.gateway
docker push sunnycase/minecase.server
fi
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 MineCase

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
60 changes: 60 additions & 0 deletions Readme-zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# MineCase [![Build Status](https://travis-ci.org/dotnetGame/MineCase.svg?branch=master)](https://travis-ci.org/dotnetGame/MineCase) [![Build status](https://ci.appveyor.com/api/projects/status/w9h243k1lqee2ke5/branch/master?svg=true)](https://ci.appveyor.com/project/sunnycase/minecase/branch/master)

![Screenshots](screenshots/1.jpg)

[English](https://github.com/dotnetGame/MineCase/blob/master/Readme.md) | [中文文档](https://github.com/dotnetGame/MineCase/blob/master/Readme-zh.md)

## 介绍

`MineCase` 是使用 `.NET Core` 开发的一个跨平台、分布式的 `Minecraft` 服务端应用,使用了 `Orleans` 框架。<br>

目前仅支持 `Minecraft` [1.12](https://minecraft.net/en-us/article/minecraft-112-pre-release-6) 的版本。

## 安装

### 从 docker 中运行(仅支持 Linux 环境)

#### 安装 docker

可以根据 [这个指南](https://yeasy.gitbooks.io/docker_practice/content/install/) 来安装好 docker。

#### 从 docker 中运行应用

```bash
curl -o docker-compose.yml https://raw.githubusercontent.com/dotnetGame/MineCase/master/build/docker/linux/docker-compose.yml
docker-compose up
```
你可以使用 `docker-compose stop` 来终止应用。

### 构建源码运行

#### 前置要求

你需要先安装 `.NET Core` sdk2.0,可以在 [这里](https://www.microsoft.com/net/download) 找到你需要的版本。

#### 获取源码

```bash
git clone [email protected]:dotnetGame/MineCase.git
cd MineCase
```
或者 [下载ZIP](https://github.com/dotnetGame/MineCase/archive/master.zip) 并进入 `MineCase` 目录。

#### 构建并运行

* Windows

双击 `build_and_run.bat`。

* Linux 和 Mac

运行 `build_and_run.sh`。

## 贡献

本项目仍在开发阶段,我们非常欢迎并感谢你为这个项目来做贡献。

如果你是开发者,我们欢迎你 Fork 这个项目并提交你的修改,有什么问题我们可以在 [Issues](https://github.com/dotnetGame/MineCase/issues) 中一起讨论。

如果你是用户,在使用这个服务器的过程中遇到的任何问题,或者有什么好的建议,都可以在 [Issues](https://github.com/dotnetGame/MineCase/issues) 中向我们提出。

111 changes: 33 additions & 78 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,104 +1,59 @@
MineCase
[![Build status](https://ci.appveyor.com/api/projects/status/w9h243k1lqee2ke5/branch/master?svg=true)](https://ci.appveyor.com/project/sunnycase/minecase/branch/master)
===
# MineCase [![Build Status](https://travis-ci.org/dotnetGame/MineCase.svg?branch=master)](https://travis-ci.org/dotnetGame/MineCase) [![Build status](https://ci.appveyor.com/api/projects/status/w9h243k1lqee2ke5/branch/master?svg=true)](https://ci.appveyor.com/project/sunnycase/minecase/branch/master)

![Screenshots](screenshots/mc5.png)
![Screenshots](screenshots/1.jpg)

## 介绍
`MineCase` 是一个分布式的 `minecraft` 服务端应用。`MineCase` 采用 `.net core` 编写,使用 `Orleans` 框架。<br>
`MineCase` 具有以下特性:
[English](https://github.com/dotnetGame/MineCase/blob/master/Readme.md) | [中文文档](https://github.com/dotnetGame/MineCase/blob/master/Readme-zh.md)

* 跨平台
* 分布式

## 要求
运行这个服务器之前,请保证你的环境满足:
## Introduction

* `.net core` sdk 2.0
`MineCase` is a cross-platform, distributed `Minecraft` server application developed using `.NET Core` that uses the `Orleans` framework.

目前支持的 `minecraft` 版本:
We currently support [Release 1.12](https://minecraft.net/en-us/article/minecraft-112-pre-release-6) Minecraft protocol versions.

* 1.12
## Setup

## 开始
### From docker(Only support Linux)

>注:本项目还在施工阶段,还没有完成所有的功能。
#### Install docker

1. 获取源码
```bash
git clone [email protected]:dotnetGame/MineCase.git
```
或者 [下载ZIP](https://github.com/dotnetGame/MineCase/archive/master.zip)。
You can install docker according to [this guide](https://docs.docker.com/engine/installation/).

2. 构建并运行
#### Run the application

进入 `MineCase` 目录下,运行 `run_server.bat`,看到下面这一行提示的时候:
```
Press Ctrl+C to terminate...
```bash
curl -o docker-compose.yml https://raw.githubusercontent.com/dotnetGame/MineCase/master/build/docker/linux/docker-compose.yml
docker-compose up
```
再运行 `run_gateway.bat` 。

## 进度

| 模块 | 完成情况 |
|:---:|:---:|
|握手协议|:white_check_mark:|
|登陆游戏|:white_check_mark:|
|进入世界|:white_check_mark:|
|地图生成|:x:|
|怪物生成|:x:|
|AI|:x:|
You can use `docker-compose stop` to stop the application。

## 反馈
### From source

如果你在使用 `MineCase` 的过程中遇到任何问题,请在 [Issues](https://github.com/dotnetGame/MineCase/issues) 中提出。
#### Pre-requirement

***

## Introduction
`MineCase` is a distributed `minecraft` server application. It is written in `.net core`, and using the `Orleans` framework. <br>
`MineCase` has the following features:
You need to install `.NET Core` sdk 2.0 first, you can find the version you need from [here](https://www.microsoft.com/net/download).

* cross-platform
* distributed
#### Get source

## Required
Before running this server, please make sure your environment meet:

* `.net core` sdk 2.0

Currently supported version of `minecraft`:
```bash
git clone [email protected]:dotnetGame/MineCase.git
cd MineCase
```
or [Download ZIP](https://github.com/dotnetGame/MineCase/archive/master.zip) and entry the `MineCase` directory.

* 1.12
#### Build and run

## Getting Start
* Windows

>Note: This project is still in the construction phase, has not completed all the feature.
Double click the `build_and_run.bat`.

1. Get source
```bash
git clone [email protected]:dotnetGame/MineCase.git
```
or [Download ZIP](https://github.com/dotnetGame/MineCase/archive/master.zip).
* Linux or Mac

2. Build and run
Run the `build_and_run.sh`.

Entry the `MineCase` directory, run `run_server.bat`, and when you see the following line:
```
Press Ctrl+C to terminate...
```
run `run_gateway.bat` .
## Contributing

## Schedule
This project is still under development. We welcome and thank you for your contribution to this project.

|Module|Finished|
|:----:|:----:|
|handshake|:white_check_mark:|
|log in|:white_check_mark:|
|entry the world|:white_check_mark:|
|map generation|:x:|
|monster generation|:x:|
|AI|:x:|
If you are a developer, we welcome you to fork this project and submit a `Pull Request` with your changes, and if you have any questions we can discuss together in the [Issues](https://github.com/dotnetGame/MineCase/issues).

## Feedback
If you encounter any problems with the use of `MineCase`, please point out that in [Issues](https://github.com/dotnetGame/MineCase/issues).
If you are a user, any questions you may have while using this server, or any good suggestions, can be addressed to us in [Issues](https://github.com/dotnetGame/MineCase/issues).
25 changes: 24 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
version: 1.0.0-alpha1-{build}
pull_requests:
do_not_increment_build_number: true
image: Visual Studio 2017
configuration: Appveyor
environment:
DOCKER_USER:
secure: goDG0WJjQvZlOe655QTbdA==
DOCKER_PASS:
secure: ONZZJySikYvgDWkBai0mZw==
before_build:
- ps: >-
cd src
Expand All @@ -11,11 +19,26 @@ before_build:
choco install codecov
build:
project: ./src/
parallel: false
verbosity: minimal
test_script:
- ps: >-
cd ..\tests

OpenCover.Console.exe -oldstyle -register:user -target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:"test" -output:".\test_coverage.xml"

codecov -f "test_coverage.xml"
codecov -f "test_coverage.xml"
deploy_script:
- ps: >-
docker tag minecase.gateway sunnycase/minecase.gateway:ci-latest-nanoserver

docker tag minecase.server sunnycase/minecase.server:ci-latest-nanoserver

IF ($env:APPVEYOR_REPO_BRANCH -eq "master")
{
docker login -u="$env:DOCKER_USER" -p="$env:DOCKER_PASS"

docker push sunnycase/minecase.gateway

docker push sunnycase/minecase.server
}
12 changes: 12 additions & 0 deletions build/docker/linux/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'

services:
minecase.server:
image: "sunnycase/minecase.server:ci-latest"

minecase.gateway:
image: "sunnycase/minecase.gateway:ci-latest"
ports:
- "25565:25565"
depends_on:
- minecase.server
12 changes: 12 additions & 0 deletions build/docker/win/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'

services:
minecase.server:
image: "sunnycase/minecase.server:ci-latest-nanoserver"

minecase.gateway:
image: "sunnycase/minecase.gateway:ci-latest-nanoserver"
ports:
- "25565:25565"
depends_on:
- minecase.server
6 changes: 5 additions & 1 deletion run_server.bat → build_and_run.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ popd
echo start MineCase.Server...
pushd src\MineCase.Server
start dotnet run
echo run "run_gateway.bat" when server is ready.
popd

echo start MineCase.Gateway...
pushd src\MineCase.Gateway
start dotnet run
popd
14 changes: 14 additions & 0 deletions build_and_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

echo building MineCase...
cd src
dotnet restore
dotnet build -c debug

echo start MineCase.Server...
cd ../src/MineCase.Server
dotnet run

echo start MineCase.Gateway...
cd ../src/MineCase.Gateway
dotnet run
Loading