Assambra / Free-MMORPG

MIT License
12 stars 5 forks source link
client ezyfox mmorpg server unity

Contributors Forks Stargazers Issues MIT License

Free-MMORPG

Logo

Explore the docs »

Get Latest · Request Feature · Report Bug

Our Demo Scene

Table of Contents

Foreword

This project utilizes free resources for both server and client technology. Without these, the project likely wouldn't have been possible, so I extend my special thanks to the team at Young Monkeys for their excellent foundational work, particularly for the EzyFox Server framework, and for sharing it with the community. Also, special thanks to all the contributors to the UMA project and their outstanding Unity Multipurpose Avatar System. For the ocean, we use the Crest Ocean System, which, in my personal opinion, is the best available ocean system for Unity. Please check out our Resources Section to see what technologies we use and consider supporting their projects in some way, such as through donations or code contributions, to help these talented individuals continue doing what they love: writing great code and developing fantastic frameworks.

For the game client we are using Unity as game engine.

(back to top)

Key Features

(back to top)

Playable Demo

We provide a playable Demo there you can play the latest release, and check first what Free-MMORPG can do, or to test and send bug reports. You can find it here: Get Latest. Only the latest release have a playable demo, provided as rar file. This client will connect to our game server.

Client

Clone from GitHub

Clone the repo:

git clone git@github.com:Assambra/Free-MMORPG.git

Get submodules:

cd Free-MMORPG

git submodule update --init --recursive

(back to top)

Needed Unity packages

To add this two packages (Newtonsoft Json and HSV-Color-Picker-Unity) manually is only required if you create a new Unity project, as example you create a Unity package from Free-MMORPG and insert it into brand-new empty Unity project. Because they are already added in this project.

Burst Compiler

Install the Burst compiler via the Unity Package Manager. Windows -> Package Manager. Select Packages: Unity Registery from the dropdown menu. Use the search field and insert Burst. Click the Install button to install the package.

Newtonsoft Json

The EzyFox Client SDK need Newtonsoft Json package to work.

Edit File: Free-MMORPG\Free-Client\Packages\manifest.json

Add a new dependency "com.unity.nuget.newtonsoft-json": "3.2.1". Please read the hint below.

Color Picker

To get the HSV-Color-Picker-Unity Edit File: Free-MMORPG\Free-Client\Packages\manifest.json

Add a new dependency "com.judahperez.hsvcolorpicker": "3.3.0" and additionally add to the file.

"scopedRegistries": [
    {
      "name": "package.openupm.com",
      "url": "https://package.openupm.com",
      "scopes": [
        "com.judahperez.hsvcolorpicker",
        "com.openupm"
      ]
    }
  ]

Hint: Don't forget commas after "dependencies" and before "scopedRegistries" -> '},' and line before the new dependency ends with also with comma too.

(back to top)

Needed projects from GitHub

UMA

Get UMA

Download our modified latest UMA version UMA 2.13 Beta 1-modified.rar with all needed modifications.

or

Download the latest UMA Unity Asset Pack UMA 2.13 Beta 1 from the UMA GitHub repository. And do all changes manually, please visit our wiki page UMA for more information.

Install UMA Package

Open with Unity the Free-MMORPG Unity project. Simple drag and drop the downloaded UMA213b.unitypackage from your download folder into the opened Unity project. Let all selected and click import.

Crest Ocean System

Get Crest Ocean System

Download the latest source code with tag 4.19 as zip file 4.19

Install Crest Ocean System

Unzip and drag the second crest folder into unity ./crest-4.19/crest-4.19/crest/Assets/Crest/Crest

(back to top)

Needed Unity packages from the Unity Asset Store

MapMagic 2

Go to the Unity asset store and buy the free asset MapMagic2 after that in the Unity Editor open the Package Manager Window -> PackageManager (Select Packages: My Assets) download and import MapMagic2 to the project.

(back to top)

Play the client

In your Unity project (FREE-Client) double-click the Persistent scene in the folder location Assets/Free-Client/Scenes/. This is our persistent scene with all Manager/Handlers ... all other scenes will automatically load additive async if needed and also the User Interfaces for the actual scene. More about the Module-GameManager please visit our wiki page Module-GameManager. Now you are ready to play the game from the Unity Editor, press play, if the server setup steps done see below.

(back to top)

Server

We use two servers free account server and free game server. You only can start and test one of it from your IDE at same time since they both use the same port. To test both at the same time, you need to deploy the server. More information can be found in the section deploy the server.

Setup Database

  1. install mongoDB
  2. open your mongosh
  3. Create your Database

use free

  1. Create a new user and password and give it access to the created database

db.createUser({user: "root", pwd: "123456",roles: [{role: "readWrite", db:"free" }] })

  1. Create two new collections:
db.createCollection("account", { collation: { locale: 'en_US', strength: 2 } } ) 
db.account.createIndex( { username: 1 } )
db.createCollection("character", { collation: { locale: 'en_US', strength: 2 } } )
db.character.createIndex( { name: 1 } )
  1. Add/Create this files to both of your Server projects:

Location: Free-Account-Server/free-account-server-common/src/main/resources/free-account-server-common-config.properties

Free-Game-Server/free-game-server-common/src/main/resources/free-game-server-common-config.properties

  1. Insert the following values for your database and change it to your needs.
database.mongo.uri=mongodb://root:123456@127.0.0.1:27017/free
database.mongo.database=free
database.mongo.collection.naming.case=UNDERSCORE
database.mongo.collection.naming.ignored_suffix=Entity

In this example file we use:

user: root

password 123456

database: free

(back to top)

Setup Mail

Enable or disable server sending mail via SMTP.

Basic Configuration

If you don't have a mail server or a mail provider that supports sending emails via SMTP, or if you do not wish to send emails (e.g., for local development), locate the following file:

Location: Free-MMORPG\Free-Server\free-server-app-api\src\main\java\com\assambra\app\constant\ServerVariables

Change the value to false: SERVER_CAN_SEND_MAIL = true.

Important: When SERVER_CAN_SEND_MAIL = false is set, only a log message in your IDE is generated on the server side. This setting is mainly intended for local development. However, it is strongly recommended to complete the email setup for production environments to ensure full functionality. Without email setup, clients will not be able to use features like "Forgot Password", "Forgot Username", and "Account Activation".

Setup Mail Values

For configuring the email functionality, use the same file you employed for your database settings in the Free-Account-Server. Add or modify the following values as required:

Location: Free-Account-Server/free-account-server-common/src/main/resources/free-account-server-common-config.properties

mail.host=mail.example.com
mail.port.tls=587
mail.port.ssl=465
mail.authentication=true
mail.username=account@example.com
mail.password=123456
mail.tls=true
mail.ssl=false
mail.mail.address=account@example.com
mail.mail.sender.name=YourCompany Account Management
mail.use.reply.address=false
mail.mail.reply.address=account@example.com
mail.charset=UTF-8
mail.content.type.primary=text/HTML
mail.content.type.sub=charset=UTF-8
mail.format=flowed
mail.content.transfer.encoding=8bit

Hint: Do not use SSL and TLS simultaneously with both set to true. There is no check in place, and only one should be set to true.

Most settings should be self-explanatory. If not, refer to the SMTP_EMail class and review the comments for each variable.

(back to top)

Deploy Server

Download Server

(back to top)

Server preparations

In this example we use the location D:\ezyfox-server

(back to top)

Export external Libraries

Steps for Account Server

Repeat the steps for the Game Server

(back to top)

Build the Server

find line "#export EZYFOX_SERVER_HOME=" remove # and insert after = D:/ezyfox-server in the two following files (please read the hint below)

In this example i use windows and Git Bash command client go to the project root of:

Hint: If is there some error:

cp: cannot create regular file 'D:ezyfox-server/settings/zones/': No such file or directory

there is some problem with forward slash and backslash depends on your operating system or command client try to use instead of D:\ezyfox-server this D:/ezyfox-server.

(back to top)

Run the server

Go to your server location D:\ezyfox-server

Windows: execute console.bat

Linux: sh ./console.sh for console server.

Linux as Service: sh ./start-service.sh. Stop the service: sh ./stop-service.sh. Restart the service: sh ./restart-service.sh

(back to top)

Contributing

Thank you for your interest in our project! We welcome contributions in various forms, whether it's through code contributions, reporting bugs, submitting feature requests, or spreading the word to your friends and colleagues. Your contribution is invaluable and helps us continuously improve our project.

Code Contributions

If you have experience in programming and would like to contribute to the development of our project, pull requests are always welcome! Please follow these steps:

  1. Fork the repository on GitHub.
  2. Create a new branch for your changes.
  3. Implement your changes and thoroughly test them.
  4. Submit a pull request to our repository.

We will review your pull request and collaborate with you to ensure your changes are properly integrated.

Reporting Bugs

If you come across a bug in our project, please don't hesitate to report it. Use our GitHub issue tracking system for this purpose. Be sure to provide as many details as possible to assist us in troubleshooting.

Feature Requests

Do you have a great idea for a new feature? Share it with us! Simply create an issue on GitHub and describe your idea in detail. We'll review and discuss your request.

Try the Playable Demo

Try out our playable demo to experience our project in action. We appreciate your feedback and impressions.

Spread the Word

An easy yet effective way to support us is by sharing our project with your friends, colleagues, and on social media. The more people learn about our work, the better!

Wiki and Documentation

Our Wiki page and documentation are places where you can share your knowledge and expertise. If you'd like to make improvements, please feel free to do so. Your contributions are valuable to the entire community.

Thank you for your support and interest in our project! Together, we can make it even better.

(back to top)

Resources Section

(back to top)

Credits

(back to top)

Thank you

(back to top)

Contact

Join us on Discord

(back to top)