vu-luong / ezy-smashers

An MMO socket game using Ezyfox server and Unity client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EzySmashers

An MMO socket game using Ezyfox server and Unity client

demo2

How to run?

  1. Set up repository:
    • Clone this repo:
      git clone https://github.com/vu-luong/ezy-smashers.git && cd ezy-smashers
      
    • Clone submodules ezyfox-server-csharp-client:
      git submodule update --init --recursive
      
  2. Run server:
    • Install mongodb (Tutorial)
    • Create ezy-smashers database with user=root and password=123456 using mongo shell:
        > use ezy-smashers;
        > db.temp.insert({"key": "value"});
        > db.createUser({user: "root", pwd: "123456", roles:[{role: "readWrite", db: "ezy-smashers"}]})
      
    • Import server folder into an IDE (Eclipse, Intellij, Netbean)
    • Run file ApplicationStartup.java
  3. Run Unity client:
  • Add client-unity folder to Unity Hub and open it.
  • Open LoginScene: Assets/1 - Static Assets/1.1 - Scenes/LoginScene.unity
  • Run LoginScene

Resolve missing scripts

If you find that some prefabs are missing scripts from ezyfox-server-csharp-client, you can resolve the issues as follows:

  • Open _Project/ScriptableObjects/Variables/EzySmashersSocketConfig and add EzySocketConfigVariable.cs script. Then, fill in the following values:
Zone Name: `EzySmashers`
App Name: `EzySmashers`
Web Socket Url: `ws://127.0.0.1:2208/ws`
Tcp Url: `127.0.0.1:3005`
Udp Port: `2611`
Udp Usage: `True`
  • Double click on _Project/Prefabs/Common/SocketEventProcessor and add EzyEventProcessor.cs script. Then sellect the above EzySmashersSocketConfig scriptable object for Socket Config field
  • Double click on _Project/Prefabs/LoginScene/LoggerConfig and add EzyUnityLoggerFactory.cs script. Then select DEBUG for Logger Level field.
  • Rerun Login Scene

Documentation

  1. ezyfox-server
  2. C# client

Contact us

Help us by donation

Currently, our operating budget is fully from on our own salaries, and all product developments are still based on voluntary contributions from a few members of the organization. Apparently, the low budget would cause many considerable difficulties for us. Therefore, with a clear roadmap and an ambitious goal to provide intellectual products for the community, we really appreciate your support if you can provide a donation to take us further steps. Thanks in advance for your meaningful contributions!

https://youngmonkeys.org/donate/

License

  • Apache License, Version 2.0

About

An MMO socket game using Ezyfox server and Unity client


Languages

Language:C# 55.0%Language:ShaderLab 18.0%Language:Java 14.1%Language:JavaScript 8.3%Language:HLSL 3.1%Language:HTML 0.8%Language:Shell 0.6%Language:Batchfile 0.1%