在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:duysqubix/MuOxi开源软件地址:https://github.com/duysqubix/MuOxi开源编程语言:HTML 95.6%开源软件介绍:Recent UpdatesDue to life.. in general the activity on this project has died down significantly. I have future plans to spin this back up again but .. well two kids later .. any sort of free time is quite precious. This is still a project I really am interested in doing and most of the work from here will be design concepts before really any implementation is done. Rust has come a long way since I first started up this project, which may require to revisit the code. For the folks who have contributed, I thank you deep from the bottom of my heart, and I urge anyone to continue to help out. I will be working on a roadmap and a list of features for anyone to take up if they feel like it. My programming skill and project management skills have also significantly changed since I started this. Keep tuned, this isn't making progress as much as I'd like, but we'll get there. If someone hasn't done this effort already. MuOxi MUD/MU* Rustic Game Engine v0.1.0MuOxi is a modern library for creating online multiplayer text games (MU* family) using the powerful features offered by Rust; backed by Tokio and Diesel,. It allows developers and coders to design and flesh out their worlds in a fast, safe, and reliable language. Explore MuOxi API the rustacean way Join us on discord. Current StatusFor Nightly Builds an update on Rust nightly seems to have broken something with the The codebase is currently in alpha stage . Majority of development is done on the ContributionsPlease submit PR's for approval and discussions.
No matter your skill level any sort of effort into this project is extremely welcomed. For those wanting to contribute, checkout the Road MapThe bare minimum TODO features that must be implemented before I would consider releasing v0.1.1
Getting StartedIn order for MuOxi applications to work as expected, it is necessary to have a fully working PostgreSQL and Redis server running.
You can change it in the code to what user postgres should be using, but the default is The following does assume you are working on Linux based OS. If you are using Windows >=10, use WSL as a linux sub and for everything else: Cygwin. However, I haven't tested this on a pure Windows environment.. Install some misc things, that have prevented me from compiling all the necessary Rust libraries.
Set Up Redis ServerFirst you must install redis:
To check if redis has installed and is running successfully run: Set Up Postgres SQL for the storage
Install Diesel Cli for migrations and database managementDiesel is the Rust go-to solution for abstraction over database manipulation. It allows Rust code to be natively wrapped around the drivers for different SQL-based databases. This is equivalent to something like Django or Twistd for the python lovers.
That should be the end of basic setup - you can test the connection by running Docker Environment, AlternativeIf you happen to use Docker for your projects, MuOxi has the necessary configuration to start hacking right away. Just type: $ docker-compose up server After a few minutes, you will have postgres, redis and MuOxi itself running. Happy Hacking! Quick Start GuideThe project contains multiple bins that can be evoked from the command line:
Database Design ArchitectureThe database design is seperated into four different layers, with different levels of abstraction. MuOxi utilizes a PostgreSQL backend for its storage needs and Redis for its caching and fast retrieval needs. A unique design approach has been taken that allows information to be kept safe from database corruption, brownouts, or blackouts. The ideology is as follows:
Layer 1: Flat FilesThe entire database actually lives in JSON files from accounts, mobs, players, equipment, spells, skills, etc...
JSON files where chosen because of the hyper-fast libraries available for manipulating json files in Rust and its friendly human readability.
A seperate process called the watchdog monitors custom defined Layer 2: PostgreSQLThis is where all persistent data will live throughout, and past, the life-span of MuOxi. Powered by an ORM management system, Diesel with
postgreSQL backend. The database should always be a reflection of what is stored in the Layer 3: Cache/In-MemoryThis is a helper layer that is dominated by Redis, for quick retrieval of information and adding ad-hoc non-persistent data such as combat, triggers, and other various information that would not be detrimental if a shutdown occured for whatever reason. This layer is meant to be used on a use-if-needed basis. Layer 4: MuOxi ApplicationsThis is the layer where MuOxi will actually use all persistent and non-persistent data to drive the actual engine itself. Whether it be handling different states of connected clients, combat data, player information, and any-and-all other memory will be read from the cached database to keep the engine running. Upon an action within MuOxi that would causes a change to the Database, MuOxi will actually write to the flat-files instead of directly to PostgreSQL. This was a throughouly thought out process to keep PostgreSQL a read-only database, from the perspective of the engine itself. When a change occurs and MuOxi writes to the flat files we began again at layer 1 of the design. It is the responsibility of the WatchDog to monitor changes to the json files and update PostgresSQL. PostgresSQL and the JSON files should always be a reflection of each other. Core Design ArchitectureThe prototype idea of how the core design is laid out into three seperate objects.
The idea is that players will connect via one of the supported communication protocols to the proxy server. In this server, clients are not actually connected to the game, unless they explicity enter. The staging area holds all connected client information such as player accounts, different characters for each player, and general settings. When a client acutally connects to the game itself the server acts as a proxy that relays information from players to the game engine, where the engine will then react to the players input. The engine and staging area will be seperated and communicate via a standard TCP server. The reason for this seperation, is to protect players from completely disconnecting from the game if changes to the game engine is made. The support for multiple type of connections is a must. Therefore the following shows an example design layout that has the ability to handle multiple communication protocols. Each comm type will have a unique port that must be addressed and acts like a proxy to the main Staging Area.
This design is still in prototype phase. Features and PhilosophyThe MuOxi library is aimed at creating a very simplistic and robust library for developers to experiment and create online text adventure games. As it stands the engine has the following capabilities:
Future/VisionThe concept around MuOxi is not just to recreate an existing MUD game engine in Rust, but rather to utilize the performance and safety that Rust has to offer. That being said, this future vision for MuOxi will change over time, but it needs to fulfill some features that I think will make this an outstanding project.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论