Boilerplate code to tinker with packets for Sphere (old Russian MMORPG) server emulator
Actual emulator would be a separate project once I have figured out most packets requred for it to work
Currently built with Godot 4.* Mono
, but there is an old plain-C# version in emu
subfolder.
Running Sphere on latest hardware (notably, RDNA 3 Radeon 7000 series) might turn out into a good old 15 fps in cities experience. If that happens to you, dgVoodoo2 might help:
- Grab the latest release from https://github.com/dege-diosg/dgVoodoo2
- Unpack, run, add new profile for Sphere (click Add and navigate to game folder)
- In the General tab, select Direct3D 12 (feature level 12.0) for Output API. Others didn't work for me, but your mileage may vary
- In DirectX tab, select dgVoodoo Virtual 3D Accelerated Card for Videocard, 512-4096 MB for VRAM
- Keep everything else as is or tweak as you like
- Copy D3D9.dll (or all files to be safe) from MS\x86 to game folder (launcher does not care about added files)
- Launch the game. If everything worked correctly, cities should jump from 15 to 150+ fps
- If not, try different Output APIs and/or Videocards
Currently relies on pre-built release package, as it has way too many interdependencies with SphereTools repo:
- Get and install prerequisities
- .NET 8.0 SDK
- Download the current release package from https://github.com/knelse/SphereEmu/releases/edit/package-v0.0.1
- Unpack and run:
StartEmulator.bat
for the serverSphereClientModded\sphereclient_patched.lnk
for the client (it runssphereclient_patched.exe
with/login
command line arg)
- Launch the game, enter desired login and password. This should create a
Players
DB entry with your login and pwd hash - Next time, use those credentials or create a new user if you like
Multiplayer is technically supported at this moment, but everything would act strangely.
Server code resides under GodotServer
. Everything else is due for a cleanup, one day...
For the main server class, go to GodotServer\MainServer.cs
. It's responsible for managing connections and game objects and creating a new Client object per every connected player.
For the client class, go to GodotServer\Client.cs
. Right now, it's a bit of a mess, but it handles the player flow once they connect to the server:
- Loading initial data and exchanging creds
- Logging in
- Getting character select screen data
- Choosing / creating / deleting characters
- Entering the game
- Ingame loop
TODO
- MainServer
- Client