I've been developing an emulator the classic version of DarkOrbit (before the new client) for around a month.
I won't bore you with the details on why I decided to emulate the classic version; so I will skip straight to the technical details of the emulator.
Note; Thread is still in progress and emulator is not released yet till main core gameplay is coded.
Source code:
---------------------------------------------------------------
Technical Details
The Daemon Emulator is coded in C++17. Using the following libraries:
- MYSQL C v5.6
- Boost v6.6
- OpenSSL v1.1
- SFMT v1 (Customised)
Networking
- Using Boost ASIO with the capability of asynchronous operations.
Database
- Using MYSQL C - Using own wrapper class which supports synchronous/asynchronous queries.
Logger
- Using own Logger class which supports the standard logging configurations: INFO, WARNING, ERROR, VERBOSE, ASSERT.
- Logs to terminal console or/and file.
- Thread Safe.
Configuration File
- Using own configuration.
- Thread Safe
Thread Pooling
- Using own Thread Pooling class.
- Optimises existing running threads and their tasks; pushes/pops tasks to other threads depending on performance on said thread.
- Thread Pooling launches x amount of threads as default depending on your machine specifications (can be changed through configuration).
- Threads are split into types:
*Inclusive: Runs multiple tasks.
*Exclusive: Only runs one task.
*Critical: Launch new task on new thread ignoring hardware concurrency.
Design Flow
- Maps:- Maps are separated into zones handled by a zone manager; zones can be multi-threaded for example; running 3 threads will designate 9 maps per zone - You can set this in the configuration option. Also maps are split into grids, each grid is independent and is dynamic (does not update if no there is no activity).
- Packets:- Packets are split into three different stages: Player Thread, World Thread and Map Thread. This ensures thread safety, and off-loading the balance between the threads; for example a non-handled packet would be processed on player thread (first thread which comes in contact with the packet).
- TOOD; More.
Progress
Strike = Completed.
Cargo
Galaxy Gates
Team Death Match
SpaceBall
and more which will be added soon.
---------------------------------------------------------------
ScreenShots
Any questions do not hesitate to ask!