Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Dartanlla/OWS into refactor/UserReg…
Browse files Browse the repository at this point in the history
…isterLogin
  • Loading branch information
CanisHelix committed May 10, 2024
2 parents eb9ecfc + 20246b6 commit f3b329e
Show file tree
Hide file tree
Showing 33 changed files with 417 additions and 486 deletions.
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<p align="center"><img src="img/Logo512pxWhite.png" alt="SabreDartStudios" width="128"></p>
<p align="center">
<br>
<img src="img/Logo512pxWhite.png" alt="SabreDartStudios" width="120">
<h2 align="center">Open World Server (OWS)</h2>
<h4 align="center"><a href="http://www.sabredartstudios.com/">By SabreDartStudios</a></h4>
</p>
<h1></h1>
<p align="center">
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Dartanlla/OWS/.github/workflows/ci.yml?branch=main&style=flat-square">
<a href="https://github.com/Dartanlla/OWS/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/Dartanlla/ows.svg?style=flat-square">
</a>
<a href="https://discord.gg/qZ76Cmxcgp">
<img src="https://img.shields.io/badge/Discord-%237289DA.svg?style=flat-square&logo=discord&logoColor=white" alt="Join Discord">
</a>
<img src="https://img.shields.io/badge/unrealengine-%23313131.svg?style=flat-square&logo=unrealengine&logoColor=white">
<img src="https://img.shields.io/badge/docker-%230db7ed.svg?style=flat-square&logo=docker&logoColor=white">
<img src="https://img.shields.io/badge/.NET-5C2D91?style=flat-square&logo=.net&logoColor=white">
<h3 align="center">Open World Server (OWS)</h3>
<h5 align="center"><a href="http://www.sabredartstudios.com/">By Sabre Dart Studios</a></h5>
</p>

Open World Server (OWS) is a server instance manager designed to create large worlds in UE4. Either by stitching together multiple UE4 maps or by splitting a single large map into multiple zones, OWS will spin up and shut down server instances as needed based on your world population. OWS can load balance your world across multiple hardware devices. OWS can support thousands of players in the same world by instancing up and out. A single zone can be instanced multiple times to support a large population in one area. Areas of a map can also be split up into multiple zones to support a larger population. In addition to server instance management, OWS also handles persistence for Accounts, Characters, Abilities, Inventory and more.

# Projects
- [Benchmarks](src/OWSBenchmarks) - This project will allow us to configure and run performance testing on the OWS API. This will be important for comparing the impact of certain changes.
- [Character Persistence](src/OWSCharacterPersistence) - The Character Persistence API will be responsible for storing our player characters and all related data.
- [Data](src/OWSData) - This is a shared project that houses our data repository access code.
- [External Login Providers](src/OWSExternalLoginProviders) - This project contains code for integrating with external login providers such as Xsolla, Google, Facebook, etc.
- [Instance Launcher](src/OWSInstanceLauncher) - This project builds our Instance Launcher that replaces the RPG World Server in OWS 1.
- [Instance Management](src/OWSInstanceManagement) - This API manages Zone Instances and the OWS Instance Launchers.
- [Public API](src/OWSPublicAPI) - This API handles all API calls that come directly from player clients such as registration, login, and connecting to the game.
- [Shared](src/OWSShared) - This project houses various miscellaneous code that multiple other projects require.
- [Tests](src/OWSTests) - This project provides Unit testing and Functional testing and Benchmark Tools (Development)
<div align="center">

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Dartanlla/OWS/.github/workflows/ci.yml?branch=main&style=flat-square)
<a href="https://github.com/Dartanlla/OWS/blob/master/LICENSE">![LICENSE](https://img.shields.io/github/license/Dartanlla/ows.svg?style=flat-square)</a>
<a href="https://discord.gg/qZ76Cmxcgp">![Join Discord](https://img.shields.io/badge/Discord-%237289DA.svg?style=flat-square&logo=discord&logoColor=white)</a>
![Unreal Engine](https://img.shields.io/badge/unrealengine-%23313131.svg?style=flat-square&logo=unrealengine&logoColor=white)
![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=flat-square&logo=docker&logoColor=white)
![.Net](https://img.shields.io/badge/.NET-5C2D91?style=flat-square&logo=.net&logoColor=white)

</div>

Open World Server (OWS) is a server instance manager designed to create large worlds in UE5. Either by stitching together multiple UE5 maps or by splitting a single large map into multiple zones, OWS will spin up and shut down server instances as needed based on your world population. OWS can load balance your world across multiple hardware devices. OWS can support thousands of players in the same world by instancing up and out. A single zone can be instanced multiple times to support a large population in one area. Areas of a map can also be split up into multiple zones to support a larger population. In addition to server instance management, OWS also handles persistence for Accounts, Characters, Abilities, Inventory and more.

### Projects

| Project | Purpose |
|-----------------------------------------------------------------|--------------------------------------------------------------------|
| [Benchmarks](src/OWSBenchmarks) | This project will allow us to configure and run performance testing on the OWS API. This will be important for comparing the impact of certain changes. |
| [Character Persistence](src/OWSCharacterPersistence) | The Character Persistence API will be responsible for storing our player characters and all related data. This will be important for comparing the impact of certain changes. |
| [Data](src/OWSData) | This is a shared project that houses our data repository access code. |
| [External Login Providers](src/OWSExternalLoginProviders) | This project contains code for integrating with external login providers such as Xsolla, Google, Facebook, etc. |
| [Instance Launcher](src/OWSInstanceLauncher) | This project builds our Instance Launcher that replaces the RPG World Server in OWS 1. |
| [Instance Management](src/OWSInstanceManagement) | This API manages Zone Instances and the OWS Instance Launchers. |
| [Public API](src/OWSPublicAPI) | This API handles all API calls that come directly from player clients such as registration, login, and connecting to the game. |
| [Shared](src/OWSShared) | This project houses various miscellaneous code that multiple other projects require. |
| [Tests](src/OWSTests) | This project provides Unit testing and Functional testing and Benchmark Tools (Development) |

# Contributing
* [Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Database Setup
parent: Getting Started
nav_order: 2
nav_order: 3
has_children: true
---

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Here is a brief overview of OWS 2.
* OWS 1 required Windows and Windows Servers. OWS 2 runs natively on **Windows**, **Linux** and **MacOS**.

## What technologies / architecture does OWS 2 use?
* The OWS Web API is developed in **C#** with **.NET 6** (previously .NET Core)
* The OWS Web API is developed in **C#** with **.NET 8** (previously .NET Core)
* The default storage technology is [Microsoft SQL Server (MSSQL)](mssql)
* Each repository can use its own storage technology
* [Storage technologies](setup-database) can be easily added by implementing each repository interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: OWS Starter Project
parent: Getting Started
nav_order: 3
nav_order: 4
has_children: true
---

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
layout: default
title: Unreal Engine 5.3.1
title: Unreal Engine 5.4.0
parent: OWS Starter Project
grand_parent: Getting Started
nav_order: 1
---

# OWS Starter Project for Unreal Engine 5.3.1
# OWS Starter Project for Unreal Engine 5.4.0
Follow these instructions if you want to setup the OWS Starter Project for Unreal Engine 5. Before you are able to setup this project you need to finish the [Docker Setup](docker-setup) and [Database setup](setup-database) sections.

## Download the project

Click on the button below to download the Open World Starter project.

[Download OpenWorldStarterDockerUE5.zip - 20231026 Release - UE 5.3.1](https://drive.google.com/file/d/1wbI8rk7PEvW1WPHCCbFT0N2kvpa92xO-/view?usp=sharing){: .btn .btn-blue .mr-4}
[Download OpenWorldStarterDockerUE5.zip - 20240428 Release - UE 5.4.0](https://drive.google.com/file/d/1X4YXwesqLHvB00xq8TqYQht3V2OuNrET/view?usp=sharing){: .btn .btn-blue .mr-4}

## Initial setup

Expand Down
98 changes: 98 additions & 0 deletions docs/getting-started/visual-studio-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
layout: default
title: Visual Studio Code
parent: Getting Started
nav_order: 2
---

# Docker Setup

## Requirements
* Download or clone [OWS](https://github.com/Dartanlla/OWS)
* Download and install [Visual Studio Code](https://code.visualstudio.com/)
* [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) extension is required
* [Docker for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) extension is required
* Download and install [Docker Desktop](https://www.docker.com/products/docker-desktop) for Windows/macOS/Linux
* [.Net 8.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
* Enable "Virtualization Technology" in your BIOS
<br />
<br />

<details open markdown="block">
<summary class="fs-6 mb-3">
Windows
</summary>

1. Make sure Windows Subsystem for Linux is installed. ![Launch Docker Compose](images/windows-subsystem-for-linux01.png){: .mt-3}
2. Download and install [Docker Desktop for Windows](https://www.docker.com/products/docker-desktop)
3. Open the src folder inside the OWS Project folder and open it with Visual Studio Code.
4. Select View -> Command Palette, Type Docker Compose Up select docker-compose.xml as the compose file.
5. Select Windows Template File ![Launch Docker Compose](images/docker-compose-vscode.png){: .mt-3}
6. <span class="label" style="margin-left: -3px">Optional</span>
Running Docker Compose without Visual Studio Code, Enter the following Command Prompt from the OWS root directory.

```bash
docker-compose -f docker-compose.yml -f docker-compose.override.windows.yml -f docker-compose-additional.yml up -d
```

For a fresh build use the following command

```bash
docker-compose -f docker-compose.yml -f docker-compose.override.windows.yml -f docker-compose-additional.yml up -d --build --force-recreate
```
</details>

<details markdown="block">
<summary class="fs-6 mb-3">
macOS
</summary>

1. Download and install [Docker Desktop for Mac](https://docs.docker.com/desktop/install/mac-install/)
2. Run the following command in a terminal to install the Development Certificates

```bash
dotnet dev-certs https --trust
```

3. Open the src folder inside the OWS Project folder and open it with Visual Studio Code.
4. Select View -> Command Palette, Type Docker Compose Up select docker-compose.xml as the compose file.
5. Select macOS Template File ![Launch Docker Compose](images/docker-compose-vscode.png){: .mt-3}
5. <span class="label" style="margin-left: -3px">Optional</span>
Running Docker Compose without Visual Studio Code, Run the following command in an terminal from the OWS root directory.

```bash
docker-compose -f docker-compose.yml -f docker-compose.override.osx.yml -f docker-compose-additional.yml up -d
```

For a fresh build use the following command

```bash
docker-compose -f docker-compose.yml -f docker-compose.override.osx.yml -f docker-compose-additional.yml up -d --build --force-recreate
```
</details>

<details markdown="block">
<summary class="fs-6 mb-3">
Linux
</summary>

1. Download and install [Docker Desktop for Linux](https://docs.docker.com/desktop/install/linux-install/)
2. Close all web browsers
3. Download and Run [dotnet-dev-certificate-linux](https://github.com/CodewareGames/dotnet-dev-certificate-linux) to install Development HTTPS Certificate.
4. Open the src folder inside the OWS Project folder and open it with Visual Studio Code.
5. Select View -> Command Palette, Type Docker Compose Up select docker-compose.xml as the compose file.
6. Select Linux Template File ![Launch Docker Compose](images/docker-compose-vscode.png){: .mt-3}
7. Run the following command in an terminal from the OWS src directory.

```bash
sudo docker-compose -f docker-compose.yml -f docker-compose.override.linux.yml -f docker-compose-additional.yml up -d
```

For a fresh build use the following command

```bash
sudo docker-compose -f docker-compose.yml -f docker-compose.override.linux.yml -f docker-compose-additional.yml up -d --build --force-recreate
```
</details>

[Next: Database setup](setup-database){: .btn .btn-outline }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: default
title: Docker Setup
title: Visual Studio
parent: Getting Started
nav_order: 1
---
Expand All @@ -12,7 +12,7 @@ nav_order: 1
* Download and install [Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)
* The ASP.NET and Web Development, Node.js Development, and Game development with C++ workloads are required
* Download and install [Docker Desktop](https://www.docker.com/products/docker-desktop) for Windows/macOS/Linux
* [.Net 6.0 SDK]([another-page](https://dotnet.microsoft.com/download/dotnet/6.0)) (On Windows this is included in VS 2022 by default)
* [.Net 8.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
* Enable "Virtualization Technology" in your BIOS
<br />
<br />
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ layout: home
</p>

<p>
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/Dartanlla/OWS/Continuous%20Integration?style=flat-square">
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Dartanlla/OWS/.github/workflows/ci.yml?branch=main&style=flat-square">
<a href="https://github.com/Dartanlla/OWS/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/Dartanlla/ows.svg?style=flat-square">
</a>
Expand Down
1 change: 0 additions & 1 deletion docs/troubleshooting/visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ layout: default
title: Visual Studio
parent: Troubleshooting
nav_order: 1
has_children: true
---

# Visual Studio
Expand Down
Binary file modified plugins/OWSPluginUE5/Content/OWSTravelToMapBP.uasset
Binary file not shown.
4 changes: 2 additions & 2 deletions plugins/OWSPluginUE5/OWSPlugin.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 5,
"VersionName": "5.3",
"VersionName": "5.4",
"FriendlyName": "OWSPlugin",
"Description": "Open World Server",
"Category": "Other",
Expand All @@ -10,7 +10,7 @@
"DocsURL": "https://www.openworldserver.com",
"MarketplaceURL": "",
"SupportURL": "",
"EngineVersion": "5.3.0",
"EngineVersion": "5.4.0",
"CanContainContent": true,
"IsBetaVersion": false,
"Installed": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ void UOWSAPISubsystem::Initialize(FSubsystemCollectionBase& Collection)
OWS2GlobalDataAPIPath,
GGameIni
);

OWS2APIRequestTimeout = 30.f;
}

void UOWSAPISubsystem::Deinitialize()
Expand Down Expand Up @@ -76,7 +74,6 @@ void UOWSAPISubsystem::GetJsonObjectFromResponse(FHttpRequestPtr Request, FHttpR
void UOWSAPISubsystem::ProcessOWS2POSTRequest(FString ApiModuleToCall, FString ApiToCall, FString PostParameters, void (UOWSAPISubsystem::* InMethodPtr)(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful))
{
Http = &FHttpModule::Get();
Http->SetHttpTimeout(OWS2APIRequestTimeout); //Set timeout
TSharedRef<IHttpRequest, ESPMode::ThreadSafe> Request = Http->CreateRequest();
Request->OnProcessRequestComplete().BindUObject(this, InMethodPtr);

Expand Down Expand Up @@ -115,7 +112,6 @@ void UOWSAPISubsystem::ProcessOWS2POSTRequest(FString ApiModuleToCall, FString A
void UOWSAPISubsystem::ProcessOWS2GETRequest(FString ApiModuleToCall, FString ApiToCall, void (UOWSAPISubsystem::* InMethodPtr)(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful))
{
Http = &FHttpModule::Get();
Http->SetHttpTimeout(OWS2APIRequestTimeout); //Set timeout
TSharedRef<IHttpRequest, ESPMode::ThreadSafe> Request = Http->CreateRequest();
Request->OnProcessRequestComplete().BindUObject(this, InMethodPtr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "Runtime/Engine/Classes/Components/AudioComponent.h"
#include "Runtime/Engine/Public/Audio.h"
#include "Runtime/Engine/Classes/Sound/SoundBase.h"
#include "Runtime/Engine/Classes/Engine/OverlapResult.h"
#include "Abilities/GameplayAbilityTargetTypes.h"
#include "AbilitySystemBlueprintLibrary.h"

Expand Down Expand Up @@ -358,7 +359,7 @@ void AOWSAdvancedProjectile::BeginFakeProjectileSynch(AOWSAdvancedProjectile* In
}
else
{
UE_LOG(OWS, Verbose, TEXT("%S: BeginFakeProjectileSynch: Move Replicated To Fake Pos: %s"), *ServerOrClient, *GetNameSafe(this));
UE_LOG(OWS, Verbose, TEXT("%s: BeginFakeProjectileSynch: Move Replicated To Fake Pos: %s"), *ServerOrClient, *GetNameSafe(this));

FRepMovement RepMovement;
RepMovement.Location = MyFakeProjectile->GetActorLocation();
Expand Down Expand Up @@ -938,10 +939,10 @@ void AOWSAdvancedProjectile::DamageImpactedActor_Implementation(AActor* OtherAct


//We use the InstigatorCharacter because if we use the Hit Character we won't have an owning connecto RPC up the prediction key.
AOWSCharacterWithAbilities* InstigatorCharacter = CastChecked<AOWSCharacterWithAbilities>(GetInstigator());
//AOWSCharacterWithAbilities* InstigatorCharacter = CastChecked<AOWSCharacterWithAbilities>(GetInstigator());

if (!IsValid(InstigatorCharacter))
{
//if (!IsValid(InstigatorCharacter))
//{
// InstigatorCharacter->HandleProjectileEffectApplicationPrediction(this, OtherActor);

/*IAbilitySystemInterface* AbilitySystemInterface = Cast<IAbilitySystemInterface>(CharacterWhoWasHit);
Expand All @@ -966,11 +967,11 @@ void AOWSAdvancedProjectile::DamageImpactedActor_Implementation(AActor* OtherAct
UE_LOG(OWS, Error, TEXT("Send GameplayEvent.AdvancedProjectile.DirectDamageEvent"));
}
}*/
}
/* }
else //Hit something other than an AOWSCharacterWithAbilities
{
}
}*/


/*
Expand Down
Loading

0 comments on commit f3b329e

Please sign in to comment.