Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Browsergames > DarkOrbit
You last visited: Today at 08:30

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Emulator/C++] Emulating Darkorbit Classic [WIP]

Discussion on [Emulator/C++] Emulating Darkorbit Classic [WIP] within the DarkOrbit forum part of the Browsergames category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2019
Posts: 14
Received Thanks: 32
[Emulator/C++] Emulating Darkorbit Classic [WIP]

Hi everyone,

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.

Login into world
Movement System
Attacking System
Kill Credit
Surrounding Objects System
Interactive Events (Stations/Portals)
NPCS spawned in world
Cargo
Drones
Galaxy Gates
Team Death Match
SpaceBall

and more which will be added soon.

---------------------------------------------------------------

ScreenShots





Any questions do not hesitate to ask!
Exenu is offline  
Thanks
11 Users
Old 10/07/2019, 18:50   #2
 
=INFINITY='s Avatar
 
elite*gold: 32
Join Date: Jun 2012
Posts: 974
Received Thanks: 559
Hey nice to see someone work on old client server i have one too in c++ not mine mybe u want work together i did old site 2009 i think u will like it xd



=INFINITY= is offline  
Thanks
1 User
Old 10/07/2019, 21:19   #3
 
elite*gold: 0
Join Date: May 2018
Posts: 2
Received Thanks: 1
notEmpty is offline  
Old 10/08/2019, 13:53   #4
 
MuffinMario's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 881
Received Thanks: 539
Nice work! Though developing a server in <current year> in C++ is making things pretty much more difficult than they should be.
Can I ask what you need OpenSSL for? This version does not use any encryption to transfer packets, etc..

If you want to compare your work to mind, feel free to check which I've been spending some time on for 2 years now
MuffinMario is offline  
Thanks
2 Users
Old 10/08/2019, 16:42   #5
 
elite*gold: 0
Join Date: Oct 2019
Posts: 296
Received Thanks: 12
Quote:
Originally Posted by MuffinMario View Post
Nice work! Though developing a server in <current year> in C++ is making things pretty much more difficult than they should be.
Can I ask what you need OpenSSL for? This version does not use any encryption to transfer packets, etc..

If you want to compare your work to mind, feel free to check which I've been spending some time on for 2 years now
is requesting your username and password. The site says: “Your authorization required message.”
username/password???????????
gyula359 is offline  
Old 10/08/2019, 20:12   #6
 
elite*gold: 0
Join Date: Oct 2019
Posts: 14
Received Thanks: 32
Quote:
Originally Posted by MuffinMario View Post
Nice work! Though developing a server in <current year> in C++ is making things pretty much more difficult than they should be.
Can I ask what you need OpenSSL for? This version does not use any encryption to transfer packets, etc..

If you want to compare your work to mind, feel free to check which I've been spending some time on for 2 years now
I will take a look at your source, thank you for sharing!

I work with C++ on a daily-basis; it feels more natural for me to code in other than C# etc...

OpenSSL is apart of my server-side core by default - I also emulate other games using the same core.
Exenu is offline  
Old 10/11/2019, 15:38   #7
 
elite*gold: 0
Join Date: Oct 2019
Posts: 296
Received Thanks: 12
Quote:
Originally Posted by Exenu View Post
I will take a look at your source, thank you for sharing!

I work with C++ on a daily-basis; it feels more natural for me to code in other than C# etc...

OpenSSL is apart of my server-side core by default - I also emulate other games using the same core.
A(z) felhasználónevet és jelszót kér. A webhely üzenete: „Your authorization required message.”
You are prompted to for username and password. This site's message is: "Your authorization required message."
what is your username and password?
gyula359 is offline  
Old 10/15/2019, 18:06   #8


 
Requi's Avatar
 
elite*gold: 3800
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,039
Received Thanks: 8,243


Isn't this a fat memory leak or am I missing something? Please do everyone a favor and use smart pointers.


Why not just use an std::mutex + std::unique_lock?
Requi is offline  
Thanks
1 User
Old 10/16/2019, 08:32   #9
 
elite*gold: 0
Join Date: Oct 2019
Posts: 14
Received Thanks: 32
Quote:
Originally Posted by Requi View Post


Isn't this a fat memory leak or am I missing something? Please do everyone a favor and use smart pointers.


Why not just use an std::mutex + std::unique_lock?
Hi, the pointer is deleted at:


There's no reason to use smart pointers in this case, as I know where I want it to be deleted. Using smart pointers would be using extra overhead for nothing, and performance is important when the function is the main entry point.

EDIT; I've misread your question. Yes that is a memory leak. Feel free to make a pull request.

The lockable class is preference, although I do not use it in most cases.
Exenu is offline  
Old 10/16/2019, 14:38   #10


 
Requi's Avatar
 
elite*gold: 3800
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,039
Received Thanks: 8,243
Quote:
Originally Posted by Exenu View Post
Hi, the pointer is deleted at:


There's no reason to use smart pointers in this case, as I know where I want it to be deleted. Using smart pointers would be using extra overhead for nothing, and performance is important when the function is the main entry point.

EDIT; I've misread your question. Yes that is a memory leak. Feel free to make a pull request.

The lockable class is preference, although I do not use it in most cases.
Using an std::unique_ptr and moving it through the functions would be basically no overhead or am I wrong?
Requi is offline  
Old 10/16/2019, 18:19   #11
 
elite*gold: 0
Join Date: Oct 2019
Posts: 14
Received Thanks: 32
Quote:
Originally Posted by Requi View Post
Using an std::unique_ptr and moving it through the functions would be basically no overhead or am I wrong?
There is no overhead when you're moving the ptr. How-ever there is overhead at allocation. In my opinion, if you're using unique_ptr and then just moving it across function to function - you're using it wrong.

I only use smart pointers when I don't care when the pointer will be deleted.

I think it's better to use malloc when it comes down to packet handling, as performance is crucial to ensure smooth gameplay.
Exenu is offline  
Old 10/23/2019, 23:17   #12
 
elite*gold: 0
Join Date: Dec 2011
Posts: 184
Received Thanks: 213
If there were a few developers who would be willing to code everything necessary to get this into a working server to be released(Good example is linkpads old server he used to have) then i would be willing to put forth the money and hosting to actually get it up. I am a diehard fan of this classic version.
ThisSoniyo is offline  
Thanks
1 User
Old 10/24/2019, 00:51   #13
 
=INFINITY='s Avatar
 
elite*gold: 32
Join Date: Jun 2012
Posts: 974
Received Thanks: 559
Dont forget contact me when u need 2009 cms header is no longer flash one xd:P
=INFINITY= is offline  
Old 10/24/2019, 11:41   #14


 
Requi's Avatar
 
elite*gold: 3800
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,039
Received Thanks: 8,243
Quote:
Originally Posted by ThisSoniyo View Post
If there were a few developers who would be willing to code everything necessary to get this into a working server to be released(Good example is linkpads old server he used to have) then i would be willing to put forth the money and hosting to actually get it up. I am a diehard fan of this classic version.
Get me some motivation and I'll put up a server. You wouldn't even need to pay, because I already have multiple servers.
Requi is offline  
Thanks
1 User
Old 10/24/2019, 20:44   #15
 
elite*gold: 0
Join Date: Oct 2019
Posts: 14
Received Thanks: 32
Quote:
Originally Posted by ThisSoniyo View Post
If there were a few developers who would be willing to code everything necessary to get this into a working server to be released(Good example is linkpads old server he used to have) then i would be willing to put forth the money and hosting to actually get it up. I am a diehard fan of this classic version.
It would help me a lot if we can get someone to build a CMS for the server. There are a few parts which prevents me from implementing without a cms.
Exenu is offline  
Reply


Similar Threads Similar Threads
Emulating Xcode
03/29/2011 - Dekaron - 0 Replies
Im trying to emulate Xcode but haven't figured out whats the right ip to get on Hosts, and i'm having doubts if im getting the path on the server right. I'd appreciate if sum1 could help out ;)
[TUT]Emulating Xigncode
03/26/2011 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 8 Replies
This isn't a spoonfeed tut on how-to it took me weeks to crack. This is all basic common sense, no programming required. 1.go into gamehi, strip xigncode 2.setup a web baised server 3.input all of xigncode's files into your webserver 4.locate your host file and communicate w/dekaron (this is basicly emulating xigncode) 5.happy hacking till this gets patched (most likly on tuesday) If you get bored you can Thank Me :D
H-Psycha's GG Emulating Tools
12/30/2010 - Soldier Front Philippines - 3 Replies
Greetings Everyone! Due to public's demand for the releasing of the GameGuard Emulation, I will supply the demand. It's up to you guys if you're gonna believe or not. This Release comes with the tutorials. And I know many still can't get it to work even with Tutorials so I came up with a plan of posting it with Screenshots to make it more understandable. You're probably thinking who am I to release this. Well, I'm Psycha. A non-famous hacker. I coded some wallhacks but I don't...
[PROJECT] Emulating / Cracking UnrealSkill's DLLs
11/28/2010 - Soldier Front Philippines - 87 Replies
For E*pvpers, we should make a team that codes and creates hacks.. (atleast crack the uS hacks) Legend: People needed: Note: Even if the position is already occupied.. you can still apply to be a part of the team.
Emulating 1059 (alternative to the bypass)
06/20/2008 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 30 Replies
Some people still had some questions about how to emulate the GG and some having problems with the bypass itself so I thought I would explain EXACTLY how to emulate GG as an alternative to the new bypass. 1. Goto C:\WINDOWS\system32\drivers\etc and edit the file hosts. Clear it out unless there are things in there you know you need and add 127.0.0.1 nprotect.acclaimdownloads.com. Now save it making sure not to change the file extension. 2. Right click the hosts file and make it...



All times are GMT +2. The time now is 08:30.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.