Konu içerisindeki Nasıl kurulur kullanılır kısmını okursanız önce ortamı kurmanız gerekli. Unreal engine 5.8, Visual studio 2026/2022 vb gibi.本项目 为非营利 性质的粉 丝自制
Gönderi otomatik olarak birleştirildi:
Nasıl çalıştırabiliriz?
Merhaba arkadaşlar,
Unreal Engine 5.8 ile geliştirdiğimiz ve detaylarına aşağıdaki bağlantıdan ulaşabileceğiniz projemizi tamamlamış bulunuyoruz. İsteyen herkes, hem sunucu (server) hem de istemci (client) tarafını kendi ihtiyaçlarına göre dilediği gibi düzenleyebilir. Proje bünyesinde onlarca editör, importer ve exporter ile özellikle yeni başlayan geliştiricilere büyük fayda sağlayacağını düşünüyorum. Projeyi dilerseniz mobil platformlar için, dilerseniz Windows/Mac/Linux ortamında derleyip çalıştırabilirsiniz.
Çalışma süreci:Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
Sıfırdan yeniden geliştirilen istemci ve bu istemciyle tam uyumlu olacak biçimde platformlar arası (cross-platform) mimariyle baştan yazılmış bir sunucu. Veritabanı altyapısı, cross-platform uyumluluğunu sağlamak amacıyla PostgreSQL kullanıldı. Geriye dönük olarak 24xx sunucularla da uyumlu çalışacak şekilde tasarlanmıştır; istemci bu sunuculara sorunsuz bağlanabilir, hatta doğrudan orijinal U*KO sunucusuna giriş yapabilirsiniz. Kısacası sunucuyu ister Windows ister Linux işletim sistemlerinde rahatlıkla çalıştırabilirsiniz.
Tüm görsel/işitsel materyaller (asset) ve binlerce dokümantasyon dahil Git deposu bağlantısı aşağıdadır (yaklaşık 30 GB). U*KO ve KO*EKO'ya ait tüm etkinlikler (events) ve eşyalar (items) projede eksiksiz yer almaktadır.
1.9 GB kod ve dökümantasyon 30 GB Asset mevcut. İsterseniz sadece kod çekerek asseti daha sonra kendinizde tamamlayabilirsiniz.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
Yıllardır severek oynadığımız oyuna bir nebze de olsa güncelleme ve modern endüstri standardı kazandırmak istedik. Projede mevcut özellikleriyle, grafik, socket sistemi, paket kripto seviyesi modernize edildi muhtemelen bir çok ücretli versiyonda bulamayacağınız standarta getirildi. Sunucu tarafındaki tüm kodlar, görev sistemleri (quests) dahil olmak üzere 5.000'den fazla test ile denetlenmiştir; tüm Lua dosyaları tek tek incelenmiştir. %90 herşey dökümante edilmiş durumda.
Dilediğiniz gibi geliştirip genişletmeniz ve optimize etmeniz dileğiyle.
Deneyenlerden ve geliştirenlerden birer görsel alırız
Ekli dosyayı görüntüle 23596
Ekli dosyayı görüntüle 23630
Ekli dosyayı görüntüle 23631
HDKO Derleme ve Çalıştırma Kılavuzu (Sunucu + Client)
Önce bilinmesi gereken üç şey:
- Depoyla gelen development.json ile client bağlanamaz. O dosyada TCP var ve kripto kapalı. Client ise her zaman WebSocket ve HDKOCrypt kullanıyor. Bu yüzden local.json dosyasını elle oluşturmanız gerekiyor (6. adım).
- Yedekler .sql uzantılı ama düz SQL değil. pg_dump custom formatındalar ve PostgreSQL 18.4 ile alınmışlar. psql -f ile açılmazlar, pg_restore 18 gerekir.
- Sunucu kripto anahtarı depoda yok. Anahtar dosyası elinizde yoksa yeni bir çift üretip iki tarafa da yapıştırmanız gerekir.
1. Ön gereksinimler
Her iki taraf için:
- Windows 10/11 x64
HDKO Derleme ve Çalıştırma Kılavuzu (Sunucu + Client)
Önce bilinmesi gereken üç şey:
- Depoyla gelen development.json ile client bağlanamaz. O dosyada TCP var ve kripto kapalı. ClienHDKOCrypt kullanıyor. Bu yüzden local.json dosyasını elle oluşturmanız gerekiyor (6. adım).
- Yedekler .sql uzantılı ama düz SQL değil. pg_dump custom formatındalar ve PostgreSQL 18.4 ile alınmışlar. psql -f ile açılmazlar, pg_restore 18 gerekir.
- Sunucu kripto anahtarı depoda yok. Anahtar dosyası elinizde yoksa yeni bir çift üretip iki tarafa da yapıştırmanız gerekir.
1. Ön gereksinimler
Her iki taraf için:
- Windows 10/11 x64
- Git ve Git LFS. Content klasörü LFS'te. LFS kurulu değilken klonlarsanız .uasset dosyaları yalnızca işaretçi olarak iner ve proje açılmaz.
- Visual Studio 2022 (17.8+) veya VS 2026
- İş yükleri: "Desktop development with C++" ve "Game development with C++"
- Bileşenler: MSVC x64, Windows SDK, "C++ CMake tools" (CMake ve Ninja buradan gelir), .NET
- Python 3.10+, PATH'te olmalı. build.bat derlemeden önce audit scriptleri çalıştırıyor; Python yoksa build başarısız olur.
Sadece sunucu için:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg, ardından bootstrap-vcpkg.bat. Bağımlılıkları ilk derlemede kendisi kurar.- PostgreSQL 18
- psqlODBC x64: ODBC sürücü listesinde adı tam olarak "PostgreSQL Unicode(x64)" görünmeli.
- Node.js 20+: isteğe bağlı, yalnızca dashboard için.
Sadece client için:
- Unreal Engine 5.8
- 300 GB'tan fazla boş disk
- DX12 / SM6 destekli ekran kartı
2. Kaynağı indirme
Örneklerde sunucunun LAN IP'si 192.168.1.100 olarak geçiyor; her yerde kendi IP'nizi yazın.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. Veritabanı
- PostgreSQL 18'i kurun. postgres kullanıcısına bir şifre verin (örnek: hdko2026), port 5432 kalsın.
- psqlODBC x64'ü kurun.
- Veritabanını oluşturup yedeği geri yükleyin:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
Üç yedek dosyası var:
- 05.10.2026-clean.sql: 237 canlı tablo. Bunu kullanın.
- 2026-10-05-dropped.sql: 285 ölü tablo.
- 05.10.2026.sql: ikisinin toplamı, 522 tablo.
Yedekler 05.10.2026 tarihli. Sunucu "eksik tablo/kolon" diyerek açılmazsa sonradan eklenmiş bir migrationsql/README.md dosyasına bakın.
Oyun hesabı: AUTO_REGISTER varsayılan olarak açık. İlk girişte yazdığınız ID ve şifreyle hesap otomatik açılır.
4. Kripto anahtarları (iki tarafta eşleşmeli)
- Client tarafı: Source/HDKO/Security/HDKOCryptKeys.cpp. Git'te duruyor; sabitlenmiş public key burada.
- Sunucu tarafı: Server/core/crypto/HDKOCryptServerKeys.h. Git'te yok, gizli seed burada. Şablonu .example dosyası; içi sıfırlarla dolu olduğu için hiçbir bağlantıyı kabul etmez.
Elinizde sunucu anahtar dosyası (HDKOCryptServerKeys.h) varsa onu kopyalamanız yeterli. Yoksa yeni bir çift üretin:
- "x64 Native Tools Command Prompt" içinde çalıştırın:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txtYeni anahtar üretirseniz eski anahtarla derlenmiş client'lar artık bağlanamaz.
- CLIENT bloğunu HDKOCryptKeys.cpp dosyasına yapıştırın.
- SERVER bloğunu Server/core/crypto/HDKOCryptServerKeys.h dosyasına yapıştırın. Çıktıda "shared/..." yolu yazıyor ama o yol eski.
- keys.txt dosyasını silin.
5. Sunucuyu derleme
Server/build.bat içindeki iki satırı kendi makinenize göre düzeltin:
Sonra derleyin:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<siz>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- Sırasıyla audit kontrolleri, cmake configure (ilk sefer uzun sürer), 8 paralel işle derleme ve Server/release klasörüne kurulum yapar.
- Son satır BUILD_ALL_OK ise derleme başarılıdır.
- Derleme hata mesajı vermeden kesilirse bellek yetmemiştir: set HDKO_BUILD_JOBS=4 yapıp Unreal editörünü kapatın.
6. Sunucu config'i
Start.bat, config\local.json dosyasını kullanıyor. Bu dosya git'te yok, kendiniz oluşturacaksınız:
- development.json dosyasını local.json adıyla kopyalayın.
- Aşağıdaki değerleri değiştirin.
- admin.bindAddress değeri 127.0.0.1 olarak kalsın. 9130 portunu asla dışarı açmayın.
- Dosyayı Server/release/config klasörüne kopyalayın ya da build.bat'i tekrar çalıştırın.
local.json içinde değiştirilecek değerler:
- crypto.enabled → true
- login.net.transport ve game.net.transport → "WS"
- login.net.bindAddress ve game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp ve serverIp → "192.168.1.100" (client'a bildirilen oyun sunucusu adresi)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
Şifreler JSON'a değil, ortam değişkenlerine yazılır:
- HDKO_PG_PASSWORD → Veritabanı şifresi. Start.bat bunu hdko2026 olarak kendisi set ediyor; şifreniz farklıysa o satırı düzeltin.
- HDKO_ADMIN_TOKEN → Admin API ve dashboard
- HDKO_OPENROUTER_KEY → Bot sohbeti, isteğe bağlı
7. Sunucuyu başlatma
Login sunucusu 15100, game sunucusu 15572 portunda iki ayrı konsolda açılır.Kod:cd Server\release scripts\Start.bat
Kontrol listesi:
- Konsollarda "error" satırı olmamalı.
- curl localhost:9130/health cevap vermeli.
- Client başka bir PC'deyse güvenlik duvarında TCP 15100 ve 15572 gelen bağlantılara açık olmalı.
Dashboard (isteğe bağlı):
- dashboard.bat içindeki DASH yolunu düzeltin.
- .env.example dosyasını .env olarak kopyalayın.
- dashboard.bat'i çalıştırıp
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.adresini açın. İlk giren kullanıcı owner olur.
8. Client ayarları
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS 0 olmalı. 1 olursa resmi KO sunucusun
- Source/HDKO/Security/HDKONetSecrets.h:HDKO_DEFAULT_LOGIN_HOST satırına sunucu IP'sini yazın ("192.168.1.100"), port 15100 kalsın.
- Editörde HDKO_DEV_LOCAL = 1 olur. Paketlenmiş build'lerin hepsinde 0 olur ve client production'a (wss://login.hd-ko.com:2053) gider.
- Paket build'in LAN sunucusuna gitmesi için dosyanın başındaki //#define HDKO_DEV_LOCAL 1 satırının yorumunu kaldırın. Release öncesi geri alın.
- Oyun sunucusunun IP'si ve portu client'ta yazmıyor; login sunucusunun server listesinden gelir.
- HDKOCryptKeys.cpp: sunucunun seed'iyle eşleşen anahtar burada olmalı (4. adım).
9. Client'ı derleme ve çalıştırma
- HDKO.uproject dosyasına sağ tıklayıp "Generate Visual Studio project files" seçin.
- HDKO.sln'yi açın, Development Editor | Win64 seçip derleyin. Alternatif olarak uproject'e çift
- Editör IntroScreen haritasıyla açılır. İlk açılışta shader derlemesi uzun sürer.
- Play'e basın, yeni bir ID ve şifreyle girin (hesap otomatik açılır), sunucuyu seçin, karakter oluşturun.
Paket build almak için:
Depodaki run.bat hâlâ UE_5.7 yolunu gösteriyor; kullanmadan önce UE_5.8 yapın.Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<siz>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. Örnek senaryo: biri sunucu, biri client iki PC
Sunucu PC (192.168.1.100):
- PostgreSQL + ODBC kurup 05.10.2026-clean.sql yedeğini geri yükleyin.
- Sunucu anahtarını yerine koyun.
- build.bat yollarını düzeltip BUILD_ALL_OK görene kadar derleyin.
- local.json'u oluşturun (WS, kripto açık, 0.0.0.0, serverIp=192.168.1.100).
- Güvenlik duvarında 15100 ve 15572 portlarını açın.
- Start.bat'i çalıştırın.
Client PC:
- UE 5.8 + VS kurun, depoyu LFS ile klonlayın.
- HDKO_OFFICIAL_SERVERS 0, LOGIN_HOST="192.168.1.100" ayarlayın; anahtar sunucuyla eşleşsin.
- Development Editor ile derleyin, Play'e basın.
Tek PC'de de aynı adımlar geçerli; IP olarak her yerde 127.0.0.1 kullanın.
11. Sık karşılaşılan sorunlar
- Bağlanıyor, hemen kopuyor → Kripto anahtarları uyuşmuyor ya da sunucuda crypto=false / TCP ayar
- Login çalışıyor, sunucuya girişte takılıyor → serverIp / gamePort yanlış veya 15572 portu kapalı.
- Sunucu açılışta ODBC hatasıyla kapanıyor → Sürücü kurulu değil ya da adı config'teki adla aynı
- Sunucu açılışta "password authentication failed" diyor → HDKO_PG_PASSWORD set edilmemiş veya yanlış.
- pg_restore sürüm hatası veriyor → pg_restore sürümü 18'den eski.
- Binlerce "Cannot open include" hatası → VS ortamı yüklenmemiş. Eski build_target.bat'i kullanmayın.
- .uasset dosyaları birkaç yüz bayt, proje açılmıyor → LFS kurulmadan klonlanmış. git lfs install ve git lfs pull çalıştırın.
Yasal Uyarı ve Hak Bildirimi (Disclaimer)
Bu proje; eğitim, pratik ve portföy geliştirme amacıyla hazırlanmış, kâr amacı gütmeyen, hayran yapımı (fan-made) bir çalışmadır._______
- Fikri Mülkiyet: Oyuna ait tüm konsept, karakterler, görseller, ses efektleri, müzikler ve ticari markalar orijinal hak sahibine aittir. Bu unsurlar üzerinde hiçbir hak veya mülkiyet iddia edilmemektedir.
- Kullanım Amacı: Bu depo (repository) ve içindeki kaynak kodları yalnızca yazılım mimarisi, oyun mekanikleri ve programlama pratiklerini sergilemek üzere paylaşılmıştır. Projeden doğrudan veya dolaylı hiçbir maddi kazanç/gelir elde edilmemektedir.
- Kaldırma Talebi: Telif veya hak sahiplerinin projeyle ilgili herhangi bir itirazı ya da talebi olması halinde, bildirim yapıldığı anda proje ve tüm kaynak kodları derhal yayından kaldırılacaktır.
Hello everyone,
We have completed the hobby development of our project built in Unreal Engine 5.8, with details provided in the link below. Anyone is free to customize and modify both the server and client sides completely to their needs. I believe this will be very useful for beginners, as dozens of editors, importers, and exporters are included in the project. Feel free to build and run it on mobile or Mac.
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
A client rebuilt from scratch and a server built from the ground up for cross-platform compatibility, fully matched with the client. The database was implemented using PostgreSQL for cross-platform support. It can also be used backward-compatibly with 24xx servers; the client connects without issues. In fact, you can even log into official U*KO using this client. In short, you can run the server on either Windows or Linux.
Git repository link including all assets and thousands of documents (the project size is around ~30 GB). All events and items from UKO / KOEKO are included in the project.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
It would be wonderful to bring modern industry standards and a fresh update to the game we have played for years. For this reason, all server-side code is verified with 5,000+ tests, including quests. Every single Lua file has been inspected individually. Wishing you all the best in developing it as you wish.- HDKO Build and Run Guide (Server + Client)
Three things to know first:
- The client cannot connect with the development.json that ships in the repo. That file uses TCP with crypto off, while the client always speaks WebSocket + HDKOCrypt. You have to create local.json by hand (step 6).
- The backups have a .sql extension but are not plain SQL. They are pg_dump custom-format archives made with PostgreSQL 18.4. psql -f cannot read them; you need pg_restore 18.
- The server crypto key is not in the repo. If you do not have the key file, generate a new pair and paste it into both ends.
1. Prerequisites
Both sides:
- Windows 10/11 x64
- Git and Git LFS. The Content folder is stored in LFS. If you clone without LFS installed, the .uasset files arrive as pointers only and the project will not open.
- Visual Studio 2022 (17.8+) or VS 2026
- Workloads: "Desktop development with C++" and "Game development with C++"
- Components: MSVC x64, Windows SDK, "C++ CMake tools" (provides CMake and Ninja), .NET
- Python 3.10+ on PATH. build.bat runs audit scripts before compiling; without Python the build fails.
Server only:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg, then bootstrap-vcpkg.bat. It installs the dependencies by itself on the first build.- PostgreSQL 18
- psqlODBC x64: the ODBC driver list must show the name exactly as "PostgreSQL Unicode(x64)".
- Node.js 20+: optional, dashboard only.
Client only:
- Unreal Engine 5.8
- 300 GB+ free disk
- DX12 / SM6 capable GPU
2. Get the source
The examples use 192.168.1.100 as the server's LAN IP; substitute your own everywhere.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. Database
- Install PostgreSQL 18. Give the postgres user a password (example: hdko2026) and keep port 5432.
- Install psqlODBC x64.
- Create the database and restore the backup:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
There are three backup files:
- 05.10.2026-clean.sql: 237 live tables. Use this one.
- 2026-10-05-dropped.sql: 285 dead tables.
- 05.10.2026.sql: both together, 522 tables.
The backups are dated 05.10.2026. If the server refuses to start with "missing table/column", a later migration is missing; see Server/docs/sql/README.md.
Game account: AUTO_REGISTER is on by default. On the first login the account is created with the ID and password you type.
4. Crypto keys (must match on both ends)
- Client side: Source/HDKO/Security/HDKOCryptKeys.cpp. Tracked in git; holds the pinned public key.
- Server side: Server/core/crypto/HDKOCryptServerKeys.h. Not in git; holds the secret seed. Its template is the .example file, which is all zeros and therefore accepts no connections.
If you have the server key file (HDKOCryptServerKeys.h), just copy it in. Otherwise generate a new pair:
- Run inside an "x64 Native Tools Command Prompt":
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txtIf you generate a new key, clients built with the old key can no longer connect.
- Paste the CLIENT block into HDKOCryptKeys.cpp.
- Paste the SERVER block into Server/core/crypto/HDKOCryptServerKeys.h. The output mentions a "shared/..." path, but that path is out of date.
- Delete keys.txt.
5. Build the server
Fix these two lines in Server/build.bat for your machine:
Then build:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<you>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- In order: audit checks, cmake configure (slow the first time), build with 8 parallel jobs, install into the Server/release folder.
- The build succeeded if the last line is BUILD_ALL_OK.
- If the build stops without an error message, memory ran out: set HDKO_BUILD_JOBS=4 and close the Unreal editor.
6. Server config
Start.bat uses config\local.json. That file is not in git, so you create it:
- Copy development.json as local.json.
- Change the values below.
- Keep admin.bindAddress at 127.0.0.1. Never expose port 9130.
- Copy the file into Server/release/config, or run build.bat again.
Values to change in local.json:
- crypto.enabled → true
- login.net.transport and game.net.transport → "WS"
- login.net.bindAddress and game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp and serverIp → "192.168.1.100" (the game server address sent to the client)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
Passwords go in environment variables, not in the JSON:
- HDKO_PG_PASSWORD → Database password. Start.bat sets it to hdko2026 itself; fix that line if your password differs.
- HDKO_ADMIN_TOKEN → Admin API and dashboard
- HDKO_OPENROUTER_KEY → Bot chat, optional
7. Start the server
The login server (port 15100) and the game server (port 15572) open in two separate consoles.Kod:cd Server\release scripts\Start.bat
Checklist:
- No "error" lines in the consoles.
- curl localhost:9130/health should answer.
- If the client is on another PC, the firewall must allow incoming TCP 15100 and 15572.
Dashboard (optional):
- Fix the DASH path in dashboard.bat.
- Copy .env.example as .env.
- Run dashboard.bat and open
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.. The first user to sign in becomes the owner.
8. Client settings
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS must be 0. With 1 the client connects to the official KO server.
- Source/HDKO/Security/HDKONetSecrets.h:put the server IP on the HDKO_DEFAULT_LOGIN_HOST line ("192.168.1.100") and keep port 15100.
- In the editor HDKO_DEV_LOCAL = 1. In every packaged build it is 0 and the client goes to production (wss://login.hd-ko.com:2053).
- To make a packaged build go to the LAN server, uncomment the //#define HDKO_DEV_LOCAL 1 line near the top of the file. Revert it before a release.
- The game server's IP and port are not in the client; they come from the login server's server list.
- HDKOCryptKeys.cpp: must hold the key that matches the server's seed (step 4).
9. Build and run the client
- Right-click HDKO.uproject and choose "Generate Visual Studio project files".
- Open HDKO.sln, select Development Editor | Win64 and build. Alternatively, double-click the uproject and answer "Yes".
- The editor opens with the IntroScreen map. The first launch spends a long time compiling shaders.
- Press Play, log in with a new ID and password (the account is created automatically), pick the server, create a character.
To make a packaged build:
The run.bat in the repo still points at UE_5.7; change it to UE_5.8 before using it.Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<you>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. Example: one PC as server, one PC as client
Server PC (192.168.1.100):
- Install PostgreSQL + ODBC and restore the 05.10.2026-clean.sql backup.
- Put the server key in place.
- Fix the build.bat paths and build until you see BUILD_ALL_OK.
- Create local.json (WS, crypto on, 0.0.0.0, serverIp=192.168.1.100).
- Open ports 15100 and 15572 in the firewall.
- Run Start.bat.
Client PC:
- Install UE 5.8 + VS, clone the repo with LFS.
- Set HDKO_OFFICIAL_SERVERS 0 and LOGIN_HOST="192.168.1.100"; the key must match the server.
- Build Development Editor and press Play.
The same steps work on a single PC; use 127.0.0.1 as the IP everywhere.
11. Common problems
- Connects, then drops immediately → The crypto keys do not match, or the server is set to crypto=false / TCP.
- Login works, entering the server hangs → serverIp / gamePort is wrong or port 15572 is closed.
- Server exits at startup with an ODBC error → The driver is not installed, or its name differs from the one in the config.
- Server exits at startup with "password authentication failed" → HDKO_PG_PASSWORD is not set or is wrong.
- pg_restore reports a version error → pg_restore is older than 18.
- Thousands of "Cannot open include" errors → The VS environment is not loaded. Do not use the old build_target.bat.
- .uasset files are a few hundred bytes, the project will not open → Cloned without LFS. Run git lfs install and git lfs pull.
Legal Notice and Disclaimer
This project is a non-profit, fan-made work created solely for educational, practice, and portfolio development purposes.안녕하세요 여러분,
- Intellectual Property: All concepts, characters, graphics, sound effects, music, and trademarks belonging to the original game are the property of the original rights holder. No rights or ownership are claimed over any of these elements.
- Intended Use: This repository and the source code within are shared exclusively to showcase software architecture, game mechanics, and programming practices. No direct or indirect financial gain or revenue is generated from this project.
- Takedown Request: If copyright or rights holders have any objections or requests regarding this project, the project and all related source code will be removed immediately upon notification.
- __________
취미로 진행해 오던 Unreal Engine 5.8 기반 프로젝트의 개발을 완료하여 공유합니다. 자세한 내용은 아래 링크에서 확인하실 수 있습니다. 누구나 필요에 맞게 서버와 클라이언트 양쪽 모두를 자유롭게 수정하고 커스텀할 수 있습니다. 수십 종의 에디터, 임포터(Importer), 익스포터(Exporter) 도구가 프로젝트에 포함되어 있어 입문자분들께 큰 도움이 될 것입니다. 모바일 환경이나 Mac 컴퓨터 어디서든 자유롭게 빌드하여 사용하실 수 있습니다.
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
처음부터 새로 제작된 클라이언트와 이에 완벽히 호환되도록 크로스 플랫폼용으로 바닥부터 개발된 서버입니다. 데이터베이스는 크로스 플랫폼 지원을 위해 PostgreSQL로 구축되었습니다. 이전 24xx 서버와도 호환되어 문제없이 접속 가능하며, 심지어 이 클라이언트로 오리지널 U*KO에 로그인할 수도 있습니다. 즉, Windows와 Linux 어디서나 서버를 원활하게 구동할 수 있습니다.
모든 에셋과 수천 개의 문서가 포함된 Git 링크입니다 (프로젝트 용량은 약 30GB 규모입니다). UKO / KOEKO의 모든 이벤트와 아이템이 프로젝트 내에 구현되어 있습니다.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
오랜 기간 함께 즐겨온 게임에 조금이나마 현대적인 업계 표준과 업데이트를 더하고자, 퀘스트를 포함한 서버 측 모든 코드는 5,000개 이상의 테스트를 거쳤습니다. 모든 Lua 스크립트 파일 역시 하나하나 면밀히 검수되었습니다. 원하시는 방향대로 멋지게 발전시켜 나가시길 바랍니다.
- HDKO 빌드 및 실행 가이드 (서버 + 클라이언트)
먼저 알아야 할 세 가지:
- 저장소에 포함된 development.json으로는 클라이언트가 접속할 수 없습니다. 이 파일은 TCP를 사용하 언트는 항상 WebSocket + HDKOCrypt를 사용합니다. 따라서 local.json을 직접 만들어야 합니다(6단계).
- 백업 파일은 .sql 확장자지만 일반 SQL이 아닙니다. PostgreSQL 18.4로 만든 pg_dump 커스텀 형식 아 없으며 pg_restore 18이 필요합니다.
- 서버 암호화 키는 저장소에 없습니다. 키 파일이 없다면 새 키 쌍을 생성해 양쪽에 붙여 넣어야 합니다.
1. 사전 요구 사항
양쪽 공통:
- Windows 10/11 x64
- Git 및 Git LFS. Content 폴더는 LFS에 저장되어 있습니다. LFS를 설치하지 않은 상태로 클론하면 .uasset 파일이 포인터로만 받아져 프로젝트가 열리지 않습니다.
- Visual Studio 2022 (17.8+) 또는 VS 2026
- 워크로드: "Desktop development with C++" 및 "Game development with C++"
- 구성 요소: MSVC x64, Windows SDK, "C++ CMake tools"(CMake와 Ninja 포함), .NET
- Python 3.10+, PATH에 등록. build.bat은 컴파일 전에 감사(audit) 스크립트를 실행하므로 Python이 없으면 빌드가 실패합니다.
서버 전용:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg 후 bootstrap-vcpkg.bat 실행. 첫 빌드 때 의존성을 자동으로 설치합니다.- PostgreSQL 18
- psqlODBC x64: ODBC 드라이버 목록에 이름이 정확히 "PostgreSQL Unicode(x64)"로 표시되어야 합니다.
- Node.js 20+: 선택 사항, 대시보드 전용.
클라이언트 전용:
- Unreal Engine 5.8
- 300 GB 이상의 여유 디스크 공간
- DX12 / SM6 지원 그래픽카드
2. 소스 받기
예시에서는 서버의 LAN IP를 192.168.1.100으로 사용합니다. 모든 곳에서 본인의 IP로 바꾸십시오.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. 데이터베이스
- PostgreSQL 18을 설치합니다. postgres 사용자에 비밀번호를 지정하고(예: hdko2026) 포트는 5432로 둡니다.
- psqlODBC x64를 설치합니다.
- 데이터베이스를 만들고 백업을 복원합니다:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql
백업 파일은 세 개입니다:
- 05.10.2026-clean.sql: 사용 중인 테이블 237개. 이 파일을 사용하십시오.
- 2026-10-05-dropped.sql: 폐기된 테이블 285개.
- 05.10.2026.sql: 두 파일의 합계, 테이블 522개.
백업 날짜는 2026.10.05입니다. 서버가 "테이블/컬럼 없음"으로 시작되지 않으면 이후에 추가된 migration이 빠진 것입니다. Server/docs/sql/README.md를 참고하십시오.
게임 계정: AUTO_REGISTER가 기본으로 켜져 있습니다. 처음 로그인할 때 입력한 ID와 비밀번호로 계정이 자동 생성됩니다.
4. 암호화 키 (양쪽이 일치해야 함)
- 클라이언트 측: Source/HDKO/Security/HDKOCryptKeys.cpp. git에 포함되어 있으며 고정된 공개 키가 들어 있습니다.
- 서버 측: Server/core/crypto/HDKOCryptServerKeys.h. git에 없으며 비밀 seed가 들어 있습니다. 템플릿은 .example 파일인데, 전부 0으로 채워져 있어 어떤 연결도 받지 않습니다.
서버 키 파일(HDKOCryptServerKeys.h)이 있다면 복사하기만 하면 됩니다. 없다면 새 키 쌍을 생성하십시오:
- "x64 Native Tools Command Prompt"에서 실행합니다:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txt새 키를 생성하면 이전 키로 빌드된 클라이언트는 더 이상 접속할 수 없습니다.
- CLIENT 블록을 HDKOCryptKeys.cpp에 붙여 넣습니다.
- SERVER 블록을 Server/core/crypto/HDKOCryptServerKeys.h에 붙여 넣습니다. 출력에는 "shared/..." 경로가 적혀 있지만 오래된 경로입니다.
- keys.txt를 삭제합니다.
5. 서버 빌드
Server/build.bat의 두 줄을 본인 환경에 맞게 수정합니다:
그다음 빌드합니다:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<사용자명>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- 순서: 감사 검사, cmake configure(첫 실행은 오래 걸림), 8개 병렬 작업으로 빌드, Server/release 폴더에 설치.
- 마지막 줄이 BUILD_ALL_OK이면 빌드 성공입니다.
/LIST]
6. 서버 설정
Start.bat은 config\local.json을 사용합니다. 이 파일은 git에 없으므로 직접 만들어야 합니다:
- development.json을 local.json이라는 이름으로 복사합니다.
- 아래 값들을 변경합니다.
- admin.bindAddress는 127.0.0.1로 둡니다. 9130 포트는 절대 외부에 열지 마십시오.
- 파일을 Server/release/config에 복사하거나 build.bat을 다시 실행합니다.
local.json에서 변경할 값:
- crypto.enabled → true
- login.net.transport 및 game.net.transport → "WS"
- login.net.bindAddress 및 game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp 및 serverIp → "192.168.1.100" (클라이언트에 전달되는 게임 서버 주소)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
비밀번호는 JSON이 아니라 환경 변수에 넣습니다:
- HDKO_PG_PASSWORD → 데이터베이스 비밀번호. Start.bat이 직접 hdko2026으로 설정합니다. 비밀번호가 다르면 해당 줄을 수정하십시오.
- HDKO_ADMIN_TOKEN → Admin API 및 대시보드
- HDKO_OPENROUTER_KEY → 봇 채팅, 선택 사항
7. 서버 시작
로그인 서버(포트 15100)와 게임 서버(포트 15572)가 각각 별도의 콘솔 창에서 실행됩니다.Kod:cd Server\release scripts\Start.bat
확인 목록:
- 콘솔에 "error" 줄이 없어야 합니다.
- curl localhost:9130/health 가 응답해야 합니다.
- 클라이언트가 다른 PC에 있다면 방화벽에서 TCP 15100 및 15572 인바운드 연결을 허용해야 합니다.
대시보드 (선택 사항):
- dashboard.bat의 DASH 경로를 수정합니다.
- .env.example을 .env로 복사합니다.
- dashboard.bat을 실행하고
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.을 엽니다. 처음 로그인한 사용자가 owner가 됩니다.
8. 클라이언트 설정[/CODE]
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS는 0이어야 합니다. 1이면 클라이언트가 공식 KO 서버에 접속합니다.
- Source/HDKO/Security/HDKONetSecrets.h:HDKO_DEFAULT_LOGIN_HOST 줄에 서버 IP("192.168.1.100")를 넣고 포트는 15100으로 둡니다.
- 에디터에서는 HDKO_DEV_LOCAL = 1입니다. 모든 패키지 빌드에서는 0이며 클라이언트가 프로덕션(wss://login.hd-ko.com:2053)으로 접속합니다.
- 패키지 빌드가 LAN 서버로 접속하게 하려면 파일 상단의 //#define HDKO_DEV_LOCAL 1 줄의 주석을 해제하십시오. 릴리스 전에 되돌려야 합니다.
- 게임 서버의 IP와 포트는 클라이언트에 적혀 있지 않으며 로그인 서버의 서버 목록에서 전달됩니다.
- HDKOCryptKeys.cpp: 서버의 seed와 일치하는 키가 들어 있어야 합니다(4단계).
저장소의 run.bat은 아직 UE_5.7 경로를 가리킵니다. 사용 전에 UE_5.8로 바꾸십시오.
10. 예시: 서버 PC 한 대, 클라이언트 PC 한 대
서버 PC (192.168.1.100):
- PostgreSQL + ODBC를 설치하고 05.10.2026-clean.sql 백업을 복원합니다.
- 서버 키를 제자리에 둡니다.
- build.bat 경로를 수정하고 BUILD_ALL_OK가 나올 때까지 빌드합니다.
- local.json을 만듭니다(WS, 암호화 켬, 0.0.0.0, serverIp=192.168.1.100).
- 방화벽에서 15100 및 15572 포트를 엽니다.
- Start.bat을 실행합니다.
클라이언트 PC:
- UE 5.8 + VS를 설치하고 LFS로 저장소를 클론합니다.
- HDKO_OFFICIAL_SERVERS 0, LOGIN_HOST="192.168.1.100"으로 설정합니다. 키가 서버와 일치해야 합니다.
- Development Editor로 빌드하고 Play를 누릅니다.
PC 한 대에서도 같은 절차가 적용됩니다. 모든 IP를 127.0.0.1로 사용하십시오.
11. 자주 발생하는 문제
- 접속 직후 바로 끊김 → 암호화 키가 일치하지 않거나 서버가 crypto=false / TCP로 설정되어 있습니다.
- 로그인은 되지만 서버 입장 시 멈춤 → serverIp / gamePort가 잘못되었거나 15572 포트가 닫혀 있습니다.
- 서버가 시작 시 ODBC 오류로 종료됨 → 드라이버가 설치되지 않았거나 이름이 설정 파일과 다릅니다.
- 서버가 시작 시 "password authentication failed"로 종료됨 → HDKO_PG_PASSWORD가 설정되지 않았거나 틀렸습니다.
- pg_restore 버전 오류 → pg_restore 버전이 18보다 낮습니다.
- 수천 개의 "Cannot open include" 오류 → VS 환경이 로드되지 않았습니다. 오래된 build_target.bat은 사용하지 마십시오.
- .uasset 파일이 수백 바이트이고 프로젝트가 열리지 않음 → LFS 없이 클론되었습니다. git lfs install 및 git lfs pull을 실행하십시오.
법적 고지 및 면책 조항 (Disclaimer)
본 프로젝트는 게임을 기반으로 한 교육, 연구 및 포트폴리오 개발 목적의 비영리 팬 메이드(fan-made) 작업물입니다.
- 지식재산권: 원작 게임에 관련된 모든 컨셉, 캐릭터, 그래픽, 음향 효과, 배경음악 및 상표권은 원 저작권자에게 있습니다. 본 프로젝트는 해당 요소들에 대해 어떠한 권리나 소유권도 주장하지 않습니다.
- 사용 목적: 본 저장소(Repository) 및 소스 코드는 순수하게 소프트웨어 아키텍처, 게임 메커니즘 및 프로그래밍 기법을 공유하고 시연하기 위한 목적으로만 배포되었습니다. 본 프로젝트를 통해 직·간접적인 어떠한 금전적 수익도 창출하지 않습니다.
- 삭제 요청: 저작권자 또는 권리권자의 이의 제기나 삭제 요청이 있을 경우, 통지를 받는 즉시 본 프로젝트와 관련 코드는 지체 없이 게시 중단 및 삭제 처리됩니다.
- ____________
大家好,
我们利用业余时间基于虚幻引擎 5.8 (Unreal Engine 5.8) 开发的项目现已完成,详情请见下方链接。任何人都可以根据自己的需求,对服务端和客户端进行全方位的修改与定制。项目中整合了数十种编辑器、导入器 (Importer) 和导出器 (Exporter) 工具,相信对新手朋友会大有帮助。无论您是想打包构建到移动端还是 Mac 电脑,均可自由运行。
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
本项目包含全新重构的客户端,以及为实现跨平台从零打造、与客户端完全匹配的服务端。为满足跨平台适配,数据库采用 PostgreSQL 编写。项目支持向下兼容 24xx 服务端,客户端均可无缝连接;甚至可以直接使用该客户端登录原版 U*KO。简而言之,无论在 Windows 还是 Linux 系统下都可以稳定运行服务端。
包含完整素材资源 (Assets) 和数千份文档的 Git 仓库链接如下(项目整体体积约为 30GB 左右)。UKO / KOEKO 的所有活动 (Events) 和道具 (Items) 均已包含在项目中。
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
为了给我们玩了多年的这款经典游戏注入现代行业标准与全新活力,服务端的所有代码均经过了 5000+ 项测试检验(涵盖各项任务逻辑),全部 Lua 脚本文件也都逐一进行了严格审查。祝大家开发愉快,尽情拓展!
- HDKO 编译与运行指南(服务器 + 客户端)
开始前须知三点:
- 仓库自带的 development.json 无法让客户端连接。该文件使用 TCP 且关闭了加密,而客户端始终使用 Web 动创建 local.json(第 6 步)。
- 备份文件虽然是 .sql 扩展名,但不是普通 SQL。它们是用 PostgreSQL 18.4 生成的 pg_dump 自定义格式归档。psql -f 无法读取,需要使用 pg_restore 18。
- 仓库中没有服务器加密密钥。如果您没有密钥文件,需要生成一对新密钥并分别粘贴到两端。
1. 前置要求
两端都需要:
- Windows 10/11 x64
- Git 和 Git LFS。Content 文件夹存放在 LFS 中。如果在未安装 LFS 的情况下克隆,.uasset 文件只会以指针形式下载,项目无法打开。
- Visual Studio 2022(17.8+)或 VS 2026
- 工作负载:"Desktop development with C++" 和 "Game development with C++"
- 组件:MSVC x64、Windows SDK、"C++ CMake tools"(提供 CMake 和 Ninja)、.NET
- Python 3.10+,并加入 PATH。build.bat 在编译前会运行审计脚本;没有 Python 编译会失败。
仅服务器:- vcpkg:git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg,然后运行 bootstrap-vcpkg.bat。首次编译时会自动安装依赖。- PostgreSQL 18
- psqlODBC x64:ODBC 驱动列表中的名称必须完全显示为 "PostgreSQL Unicode(x64)"。
- Node.js 20+:可选,仅用于 dashboard。
仅客户端:- Unreal Engine 5.8
- 300 GB 以上可用磁盘空间
- 支持 DX12 / SM6 的显卡
2. 获取源码
示例中服务器的局域网 IP 为 192.168.1.100,请在所有地方替换为您自己的 IP。Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. 数据库
- 安装 PostgreSQL 18。为 postgres 用户设置密码(示例:hdko2026),端口保持 5432。
- 安装 psqlODBC x64。
- 创建数据库并恢复备份:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
共有三个备份文件:备份日期为 2026.10.05。如果服务器提示"缺少表/列"而无法启动,说明缺少之后新增的 migration;请参阅 Server/docs/sql/README.md。
- 05.10.2026-clean.sql:237 张在用表。请使用此文件。
- 2026-10-05-dropped.sql:285 张废弃表。
- 05.10.2026.sql:两者合计,522 张表。
游戏账号:AUTO_REGISTER 默认开启。首次登录时会用您输入的 ID 和密码自动创建账号。
4. 加密密钥(两端必须匹配)如果您有服务器密钥文件(HDKOCryptServerKeys.h),直接复制进去即可。否则请生成新的密钥对:
- 客户端:Source/HDKO/Security/HDKOCryptKeys.cpp。已纳入 git,存放固定的公钥。
- 服务器:Server/core/crypto/HDKOCryptServerKeys.h。不在 git 中,存放私密 seed。模板为 .example 文件,内容全为零,因此不会接受任何连接。
- 在 "x64 Native Tools Command Prompt" 中运行:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txt生成新密钥后,用旧密钥编译的客户端将无法再连接。
- 将 CLIENT 块粘贴到 HDKOCryptKeys.cpp。
- 将 SERVER 块粘贴到 Server/core/crypto/HDKOCryptServerKeys.h。输出中写的是 "shared/..." 路径,但该路径已过时。
- 删除 keys.txt。
5. 编译服务器
按您的机器修改 Server/build.bat 中的两行:
然后编译:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<您的用户名>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- 依次执行:审计检查、cmake configure(首次较慢)、8 个并行任务编译、安装到 Server/release 文件夹。
- 最后一行为 BUILD_ALL_OK 即表示编译成功。
- 如果编译在没有错误信息的情况下中断,说明内存不足:执行 set HDKO_BUILD_JOBS=4 并关闭 Unreal 编辑器。
6. 服务器配置
Start.bat 使用 config\local.json。该文件不在 git 中,需要自己创建:
- 将 development.json 复制为 local.json。
- 修改下列值。
- admin.bindAddress 保持 127.0.0.1。切勿对外开放 9130 端口。
- 将文件复制到 Server/release/config,或重新运行 build.bat。
local.json 中需要修改的值:- crypto.enabled → true
- login.net.transport 和 game.net.transport → "WS"
- login.net.bindAddress 和 game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp 和 serverIp → "192.168.1.100"(发送给客户端的游戏服务器地址)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
密码写在环境变量中,而不是 JSON 中:- HDKO_PG_PASSWORD → 数据库密码。Start.bat 会自行设为 hdko2026;如果您的密码不同,请修改该行。
- HDKO_ADMIN_TOKEN → Admin API 和 dashboard
- HDKO_OPENROUTER_KEY → 机器人聊天,可选
7. 启动服务器
登录服务器(端口 15100)和游戏服务器(端口 15572)会在两个独立的控制台中打开。Kod:cd Server\release scripts\Start.bat
检查清单:打包版本:
- 控制台中不应出现 "error" 行。
- curl localhost:9130/health 应有响应。
- 如果客户端在另一台电脑上,防火墙必须允许 TCP 15100 和 15572 入站连接。
Dashboard(可选):- 修改 dashboard.bat 中的 DASH 路径。
- 将 .env.example 复制为 .env。
- 运行 dashboard.bat 并打开 http://localhost:4000。第一个登录的用户成为 owner。
8. 客户端设置- Source/HDKO/Defs/HDKOBuildConfig.h:HDKO_OFFICIAL_SERVERS 必须为 0。设为 1 时客户端会连接官方 KO 服务器。
- Source/HDKO/Security/HDKONetSecrets.h:在 HDKO_DEFAULT_LOGIN_HOST 行填入服务器 IP("192.168.1.100"),端口保持 15100。
- 在编辑器中 HDKO_DEV_LOCAL = 1。所有打包版本中为 0,客户端会连接生产服务器(wss://login.hd-ko.com:2053)。
- 若要让打包版本连接局域网服务器,请取消文件开头 //#define HDKO_DEV_LOCAL 1 这一行的注释。发布前请改回。
- 游戏服务器的 IP 和端口不写在客户端中,而是来自登录服务器的服务器列表。
- HDKOCryptKeys.cpp:必须包含与服务器 seed 匹配的密钥(第 4 步)。
9. 编译并运行客户端- 右键点击 HDKO.uproject,选择 "Generate Visual Studio project files"。
- 打开 HDKO.sln,选择 Development Editor | Win64 并编译。也可以双击 uproject 并选择 "Yes"。
- 编辑器会打开 IntroScreen 地图。首次启动时着色器编译耗时较长。
- 点击 Play,用新的 ID 和密码登录(账号自动创建),选择服务器,创建角色。
仓库中的 run.bat 仍指向 UE_5.7;使用前请改为 UE_5.8。Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<您的用户名>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. 示例:一台电脑作服务器,另一台作客户端
服务器电脑(192.168.1.100):单台电脑同样适用;所有 IP 均使用 127.0.0.1。
- 安装 PostgreSQL + ODBC,恢复 05.10.2026-clean.sql 备份。
- 放好服务器密钥。
- 修改 build.bat 中的路径,编译直到出现 BUILD_ALL_OK。
- 创建 local.json(WS、开启加密、0.0.0.0、serverIp=192.168.1.100)。
- 在防火墙中开放 15100 和 15572 端口。
- 运行 Start.bat。
客户端电脑:- 安装 UE 5.8 + VS,使用 LFS 克隆仓库。
- 设置 HDKO_OFFICIAL_SERVERS 0 和 LOGIN_HOST="192.168.1.100";密钥必须与服务器匹配。
- 编译 Development Editor,点击 Play。
11. 常见问题
- 连接后立即断开 → 加密密钥不匹配,或服务器设置为 crypto=false / TCP。
- 登录正常,进入服务器时卡住 → serverIp / gamePort 错误,或 15572 端口未开放。
- 服务器启动时因 ODBC 错误退出 → 未安装驱动,或驱动名称与配置中的不一致。
- 服务器启动时提示 "password authentication failed" → HDKO_PG_PASSWORD 未设置或错误。
- pg_restore 报版本错误 → pg_restore 版本低于 18。
- 出现数千条 "Cannot open include" 错误 → 未加载 VS 环境。不要使用旧的 build_target.bat。
- .uasset 文件只有几百字节,项目无法打开 → 克隆时未安装 LFS。运行 git lfs install 和 git lfs pull
法律声明与免责声明 (Disclaimer)
本项目为非营利性质的粉丝自制 (fan-made) 作品,仅供技术学习、实践交流及作品集展示使用。
- 知识产权: 原版游戏涉及的所有概念、角色、美术图像、音效、音乐及注册商标均归原版权方所有。本项目对上述任何元素均不主张任何权利或所有权。
- 使用目的: 本代码仓库 (Repository) 及其包含的源码仅用于展示软件架构、游戏机制和编程实践。本项目不存在任何直接或间接的商业盈利行为。
- 下架要求: 若版权方或权利持有人对此项目有任何异议或下架诉求,一经收到通知,本项目及所有相关源码将立即下架并删除。
Aşağı İn İn Bitmedi Bu Nedir ArkadaşMerhaba arkadaşlar,
Unreal Engine 5.8 ile geliştirdiğimiz ve detaylarına aşağıdaki bağlantıdan ulaşabileceğiniz projemizi tamamlamış bulunuyoruz. İsteyen herkes, hem sunucu (server) hem de istemci (client) tarafını kendi ihtiyaçlarına göre dilediği gibi düzenleyebilir. Proje bünyesinde onlarca editör, importer ve exporter ile özellikle yeni başlayan geliştiricilere büyük fayda sağlayacağını düşünüyorum. Projeyi dilerseniz mobil platformlar için, dilerseniz Windows/Mac/Linux ortamında derleyip çalıştırabilirsiniz.
Çalışma süreci:Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
Sıfırdan yeniden geliştirilen istemci ve bu istemciyle tam uyumlu olacak biçimde platformlar arası (cross-platform) mimariyle baştan yazılmış bir sunucu. Veritabanı altyapısı, cross-platform uyumluluğunu sağlamak amacıyla PostgreSQL kullanıldı. Geriye dönük olarak 24xx sunucularla da uyumlu çalışacak şekilde tasarlanmıştır; istemci bu sunuculara sorunsuz bağlanabilir, hatta doğrudan orijinal U*KO sunucusuna giriş yapabilirsiniz. Kısacası sunucuyu ister Windows ister Linux işletim sistemlerinde rahatlıkla çalıştırabilirsiniz.
Tüm görsel/işitsel materyaller (asset) ve binlerce dokümantasyon dahil Git deposu bağlantısı aşağıdadır (yaklaşık 30 GB). U*KO ve KO*EKO'ya ait tüm etkinlikler (events) ve eşyalar (items) projede eksiksiz yer almaktadır.
1.9 GB kod ve dökümantasyon 30 GB Asset mevcut. İsterseniz sadece kod çekerek asseti daha sonra kendinizde tamamlayabilirsiniz.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
Yıllardır severek oynadığımız oyuna bir nebze de olsa güncelleme ve modern endüstri standardı kazandırmak istedik. Projede mevcut özellikleriyle, grafik, socket sistemi, paket kripto seviyesi modernize edildi muhtemelen bir çok ücretli versiyonda bulamayacağınız standarta getirildi. Sunucu tarafındaki tüm kodlar, görev sistemleri (quests) dahil olmak üzere 5.000'den fazla test ile denetlenmiştir; tüm Lua dosyaları tek tek incelenmiştir. %90 herşey dökümante edilmiş durumda.
Dilediğiniz gibi geliştirip genişletmeniz ve optimize etmeniz dileğiyle.
Deneyenlerden ve geliştirenlerden birer görsel alırız
Ekli dosyayı görüntüle 23596
Ekli dosyayı görüntüle 23630
Ekli dosyayı görüntüle 23631
HDKO Derleme ve Çalıştırma Kılavuzu (Sunucu + Client)
Önce bilinmesi gereken üç şey:
- Depoyla gelen development.json ile client bağlanamaz. O dosyada TCP var ve kripto kapalı. Client ise her zaman WebSocket ve HDKOCrypt kullanıyor. Bu yüzden local.json dosyasını elle oluşturmanız gerekiyor (6. adım).
- Yedekler .sql uzantılı ama düz SQL değil. pg_dump custom formatındalar ve PostgreSQL 18.4 ile alınmışlar. psql -f ile açılmazlar, pg_restore 18 gerekir.
- Sunucu kripto anahtarı depoda yok. Anahtar dosyası elinizde yoksa yeni bir çift üretip iki tarafa da yapıştırmanız gerekir.
1. Ön gereksinimler
Her iki taraf için:
- Windows 10/11 x64
HDKO Derleme ve Çalıştırma Kılavuzu (Sunucu + Client)
Önce bilinmesi gereken üç şey:
- Depoyla gelen development.json ile client bağlanamaz. O dosyada TCP var ve kripto kapalı. ClienHDKOCrypt kullanıyor. Bu yüzden local.json dosyasını elle oluşturmanız gerekiyor (6. adım).
- Yedekler .sql uzantılı ama düz SQL değil. pg_dump custom formatındalar ve PostgreSQL 18.4 ile alınmışlar. psql -f ile açılmazlar, pg_restore 18 gerekir.
- Sunucu kripto anahtarı depoda yok. Anahtar dosyası elinizde yoksa yeni bir çift üretip iki tarafa da yapıştırmanız gerekir.
1. Ön gereksinimler
Her iki taraf için:
- Windows 10/11 x64
- Git ve Git LFS. Content klasörü LFS'te. LFS kurulu değilken klonlarsanız .uasset dosyaları yalnızca işaretçi olarak iner ve proje açılmaz.
- Visual Studio 2022 (17.8+) veya VS 2026
- İş yükleri: "Desktop development with C++" ve "Game development with C++"
- Bileşenler: MSVC x64, Windows SDK, "C++ CMake tools" (CMake ve Ninja buradan gelir), .NET
- Python 3.10+, PATH'te olmalı. build.bat derlemeden önce audit scriptleri çalıştırıyor; Python yoksa build başarısız olur.
Sadece sunucu için:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg, ardından bootstrap-vcpkg.bat. Bağımlılıkları ilk derlemede kendisi kurar.- PostgreSQL 18
- psqlODBC x64: ODBC sürücü listesinde adı tam olarak "PostgreSQL Unicode(x64)" görünmeli.
- Node.js 20+: isteğe bağlı, yalnızca dashboard için.
Sadece client için:
- Unreal Engine 5.8
- 300 GB'tan fazla boş disk
- DX12 / SM6 destekli ekran kartı
2. Kaynağı indirme
Örneklerde sunucunun LAN IP'si 192.168.1.100 olarak geçiyor; her yerde kendi IP'nizi yazın.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. Veritabanı
- PostgreSQL 18'i kurun. postgres kullanıcısına bir şifre verin (örnek: hdko2026), port 5432 kalsın.
- psqlODBC x64'ü kurun.
- Veritabanını oluşturup yedeği geri yükleyin:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
Üç yedek dosyası var:
- 05.10.2026-clean.sql: 237 canlı tablo. Bunu kullanın.
- 2026-10-05-dropped.sql: 285 ölü tablo.
- 05.10.2026.sql: ikisinin toplamı, 522 tablo.
Yedekler 05.10.2026 tarihli. Sunucu "eksik tablo/kolon" diyerek açılmazsa sonradan eklenmiş bir migrationsql/README.md dosyasına bakın.
Oyun hesabı: AUTO_REGISTER varsayılan olarak açık. İlk girişte yazdığınız ID ve şifreyle hesap otomatik açılır.
4. Kripto anahtarları (iki tarafta eşleşmeli)
- Client tarafı: Source/HDKO/Security/HDKOCryptKeys.cpp. Git'te duruyor; sabitlenmiş public key burada.
- Sunucu tarafı: Server/core/crypto/HDKOCryptServerKeys.h. Git'te yok, gizli seed burada. Şablonu .example dosyası; içi sıfırlarla dolu olduğu için hiçbir bağlantıyı kabul etmez.
Elinizde sunucu anahtar dosyası (HDKOCryptServerKeys.h) varsa onu kopyalamanız yeterli. Yoksa yeni bir çift üretin:
- "x64 Native Tools Command Prompt" içinde çalıştırın:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txtYeni anahtar üretirseniz eski anahtarla derlenmiş client'lar artık bağlanamaz.
- CLIENT bloğunu HDKOCryptKeys.cpp dosyasına yapıştırın.
- SERVER bloğunu Server/core/crypto/HDKOCryptServerKeys.h dosyasına yapıştırın. Çıktıda "shared/..." yolu yazıyor ama o yol eski.
- keys.txt dosyasını silin.
5. Sunucuyu derleme
Server/build.bat içindeki iki satırı kendi makinenize göre düzeltin:
Sonra derleyin:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<siz>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- Sırasıyla audit kontrolleri, cmake configure (ilk sefer uzun sürer), 8 paralel işle derleme ve Server/release klasörüne kurulum yapar.
- Son satır BUILD_ALL_OK ise derleme başarılıdır.
- Derleme hata mesajı vermeden kesilirse bellek yetmemiştir: set HDKO_BUILD_JOBS=4 yapıp Unreal editörünü kapatın.
6. Sunucu config'i
Start.bat, config\local.json dosyasını kullanıyor. Bu dosya git'te yok, kendiniz oluşturacaksınız:
- development.json dosyasını local.json adıyla kopyalayın.
- Aşağıdaki değerleri değiştirin.
- admin.bindAddress değeri 127.0.0.1 olarak kalsın. 9130 portunu asla dışarı açmayın.
- Dosyayı Server/release/config klasörüne kopyalayın ya da build.bat'i tekrar çalıştırın.
local.json içinde değiştirilecek değerler:
- crypto.enabled → true
- login.net.transport ve game.net.transport → "WS"
- login.net.bindAddress ve game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp ve serverIp → "192.168.1.100" (client'a bildirilen oyun sunucusu adresi)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
Şifreler JSON'a değil, ortam değişkenlerine yazılır:
- HDKO_PG_PASSWORD → Veritabanı şifresi. Start.bat bunu hdko2026 olarak kendisi set ediyor; şifreniz farklıysa o satırı düzeltin.
- HDKO_ADMIN_TOKEN → Admin API ve dashboard
- HDKO_OPENROUTER_KEY → Bot sohbeti, isteğe bağlı
7. Sunucuyu başlatma
Login sunucusu 15100, game sunucusu 15572 portunda iki ayrı konsolda açılır.Kod:cd Server\release scripts\Start.bat
Kontrol listesi:
- Konsollarda "error" satırı olmamalı.
- curl localhost:9130/health cevap vermeli.
- Client başka bir PC'deyse güvenlik duvarında TCP 15100 ve 15572 gelen bağlantılara açık olmalı.
Dashboard (isteğe bağlı):
- dashboard.bat içindeki DASH yolunu düzeltin.
- .env.example dosyasını .env olarak kopyalayın.
- dashboard.bat'i çalıştırıp
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.adresini açın. İlk giren kullanıcı owner olur.
8. Client ayarları
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS 0 olmalı. 1 olursa resmi KO sunucusun
- Source/HDKO/Security/HDKONetSecrets.h:HDKO_DEFAULT_LOGIN_HOST satırına sunucu IP'sini yazın ("192.168.1.100"), port 15100 kalsın.
- Editörde HDKO_DEV_LOCAL = 1 olur. Paketlenmiş build'lerin hepsinde 0 olur ve client production'a (wss://login.hd-ko.com:2053) gider.
- Paket build'in LAN sunucusuna gitmesi için dosyanın başındaki //#define HDKO_DEV_LOCAL 1 satırının yorumunu kaldırın. Release öncesi geri alın.
- Oyun sunucusunun IP'si ve portu client'ta yazmıyor; login sunucusunun server listesinden gelir.
- HDKOCryptKeys.cpp: sunucunun seed'iyle eşleşen anahtar burada olmalı (4. adım).
9. Client'ı derleme ve çalıştırma
- HDKO.uproject dosyasına sağ tıklayıp "Generate Visual Studio project files" seçin.
- HDKO.sln'yi açın, Development Editor | Win64 seçip derleyin. Alternatif olarak uproject'e çift
- Editör IntroScreen haritasıyla açılır. İlk açılışta shader derlemesi uzun sürer.
- Play'e basın, yeni bir ID ve şifreyle girin (hesap otomatik açılır), sunucuyu seçin, karakter oluşturun.
Paket build almak için:
Depodaki run.bat hâlâ UE_5.7 yolunu gösteriyor; kullanmadan önce UE_5.8 yapın.Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<siz>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. Örnek senaryo: biri sunucu, biri client iki PC
Sunucu PC (192.168.1.100):
- PostgreSQL + ODBC kurup 05.10.2026-clean.sql yedeğini geri yükleyin.
- Sunucu anahtarını yerine koyun.
- build.bat yollarını düzeltip BUILD_ALL_OK görene kadar derleyin.
- local.json'u oluşturun (WS, kripto açık, 0.0.0.0, serverIp=192.168.1.100).
- Güvenlik duvarında 15100 ve 15572 portlarını açın.
- Start.bat'i çalıştırın.
Client PC:
- UE 5.8 + VS kurun, depoyu LFS ile klonlayın.
- HDKO_OFFICIAL_SERVERS 0, LOGIN_HOST="192.168.1.100" ayarlayın; anahtar sunucuyla eşleşsin.
- Development Editor ile derleyin, Play'e basın.
Tek PC'de de aynı adımlar geçerli; IP olarak her yerde 127.0.0.1 kullanın.
11. Sık karşılaşılan sorunlar
- Bağlanıyor, hemen kopuyor → Kripto anahtarları uyuşmuyor ya da sunucuda crypto=false / TCP ayar
- Login çalışıyor, sunucuya girişte takılıyor → serverIp / gamePort yanlış veya 15572 portu kapalı.
- Sunucu açılışta ODBC hatasıyla kapanıyor → Sürücü kurulu değil ya da adı config'teki adla aynı
- Sunucu açılışta "password authentication failed" diyor → HDKO_PG_PASSWORD set edilmemiş veya yanlış.
- pg_restore sürüm hatası veriyor → pg_restore sürümü 18'den eski.
- Binlerce "Cannot open include" hatası → VS ortamı yüklenmemiş. Eski build_target.bat'i kullanmayın.
- .uasset dosyaları birkaç yüz bayt, proje açılmıyor → LFS kurulmadan klonlanmış. git lfs install ve git lfs pull çalıştırın.
Yasal Uyarı ve Hak Bildirimi (Disclaimer)
Bu proje; eğitim, pratik ve portföy geliştirme amacıyla hazırlanmış, kâr amacı gütmeyen, hayran yapımı (fan-made) bir çalışmadır._______
- Fikri Mülkiyet: Oyuna ait tüm konsept, karakterler, görseller, ses efektleri, müzikler ve ticari markalar orijinal hak sahibine aittir. Bu unsurlar üzerinde hiçbir hak veya mülkiyet iddia edilmemektedir.
- Kullanım Amacı: Bu depo (repository) ve içindeki kaynak kodları yalnızca yazılım mimarisi, oyun mekanikleri ve programlama pratiklerini sergilemek üzere paylaşılmıştır. Projeden doğrudan veya dolaylı hiçbir maddi kazanç/gelir elde edilmemektedir.
- Kaldırma Talebi: Telif veya hak sahiplerinin projeyle ilgili herhangi bir itirazı ya da talebi olması halinde, bildirim yapıldığı anda proje ve tüm kaynak kodları derhal yayından kaldırılacaktır.
Hello everyone,
We have completed the hobby development of our project built in Unreal Engine 5.8, with details provided in the link below. Anyone is free to customize and modify both the server and client sides completely to their needs. I believe this will be very useful for beginners, as dozens of editors, importers, and exporters are included in the project. Feel free to build and run it on mobile or Mac.
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
A client rebuilt from scratch and a server built from the ground up for cross-platform compatibility, fully matched with the client. The database was implemented using PostgreSQL for cross-platform support. It can also be used backward-compatibly with 24xx servers; the client connects without issues. In fact, you can even log into official U*KO using this client. In short, you can run the server on either Windows or Linux.
Git repository link including all assets and thousands of documents (the project size is around ~30 GB). All events and items from UKO / KOEKO are included in the project.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
It would be wonderful to bring modern industry standards and a fresh update to the game we have played for years. For this reason, all server-side code is verified with 5,000+ tests, including quests. Every single Lua file has been inspected individually. Wishing you all the best in developing it as you wish.- HDKO Build and Run Guide (Server + Client)
Three things to know first:
- The client cannot connect with the development.json that ships in the repo. That file uses TCP with crypto off, while the client always speaks WebSocket + HDKOCrypt. You have to create local.json by hand (step 6).
- The backups have a .sql extension but are not plain SQL. They are pg_dump custom-format archives made with PostgreSQL 18.4. psql -f cannot read them; you need pg_restore 18.
- The server crypto key is not in the repo. If you do not have the key file, generate a new pair and paste it into both ends.
1. Prerequisites
Both sides:
- Windows 10/11 x64
- Git and Git LFS. The Content folder is stored in LFS. If you clone without LFS installed, the .uasset files arrive as pointers only and the project will not open.
- Visual Studio 2022 (17.8+) or VS 2026
- Workloads: "Desktop development with C++" and "Game development with C++"
- Components: MSVC x64, Windows SDK, "C++ CMake tools" (provides CMake and Ninja), .NET
- Python 3.10+ on PATH. build.bat runs audit scripts before compiling; without Python the build fails.
Server only:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg, then bootstrap-vcpkg.bat. It installs the dependencies by itself on the first build.- PostgreSQL 18
- psqlODBC x64: the ODBC driver list must show the name exactly as "PostgreSQL Unicode(x64)".
- Node.js 20+: optional, dashboard only.
Client only:
- Unreal Engine 5.8
- 300 GB+ free disk
- DX12 / SM6 capable GPU
2. Get the source
The examples use 192.168.1.100 as the server's LAN IP; substitute your own everywhere.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. Database
- Install PostgreSQL 18. Give the postgres user a password (example: hdko2026) and keep port 5432.
- Install psqlODBC x64.
- Create the database and restore the backup:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
There are three backup files:
- 05.10.2026-clean.sql: 237 live tables. Use this one.
- 2026-10-05-dropped.sql: 285 dead tables.
- 05.10.2026.sql: both together, 522 tables.
The backups are dated 05.10.2026. If the server refuses to start with "missing table/column", a later migration is missing; see Server/docs/sql/README.md.
Game account: AUTO_REGISTER is on by default. On the first login the account is created with the ID and password you type.
4. Crypto keys (must match on both ends)
- Client side: Source/HDKO/Security/HDKOCryptKeys.cpp. Tracked in git; holds the pinned public key.
- Server side: Server/core/crypto/HDKOCryptServerKeys.h. Not in git; holds the secret seed. Its template is the .example file, which is all zeros and therefore accepts no connections.
If you have the server key file (HDKOCryptServerKeys.h), just copy it in. Otherwise generate a new pair:
- Run inside an "x64 Native Tools Command Prompt":
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txtIf you generate a new key, clients built with the old key can no longer connect.
- Paste the CLIENT block into HDKOCryptKeys.cpp.
- Paste the SERVER block into Server/core/crypto/HDKOCryptServerKeys.h. The output mentions a "shared/..." path, but that path is out of date.
- Delete keys.txt.
5. Build the server
Fix these two lines in Server/build.bat for your machine:
Then build:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<you>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- In order: audit checks, cmake configure (slow the first time), build with 8 parallel jobs, install into the Server/release folder.
- The build succeeded if the last line is BUILD_ALL_OK.
- If the build stops without an error message, memory ran out: set HDKO_BUILD_JOBS=4 and close the Unreal editor.
6. Server config
Start.bat uses config\local.json. That file is not in git, so you create it:
- Copy development.json as local.json.
- Change the values below.
- Keep admin.bindAddress at 127.0.0.1. Never expose port 9130.
- Copy the file into Server/release/config, or run build.bat again.
Values to change in local.json:
- crypto.enabled → true
- login.net.transport and game.net.transport → "WS"
- login.net.bindAddress and game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp and serverIp → "192.168.1.100" (the game server address sent to the client)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
Passwords go in environment variables, not in the JSON:
- HDKO_PG_PASSWORD → Database password. Start.bat sets it to hdko2026 itself; fix that line if your password differs.
- HDKO_ADMIN_TOKEN → Admin API and dashboard
- HDKO_OPENROUTER_KEY → Bot chat, optional
7. Start the server
The login server (port 15100) and the game server (port 15572) open in two separate consoles.Kod:cd Server\release scripts\Start.bat
Checklist:
- No "error" lines in the consoles.
- curl localhost:9130/health should answer.
- If the client is on another PC, the firewall must allow incoming TCP 15100 and 15572.
Dashboard (optional):
- Fix the DASH path in dashboard.bat.
- Copy .env.example as .env.
- Run dashboard.bat and open
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.. The first user to sign in becomes the owner.
8. Client settings
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS must be 0. With 1 the client connects to the official KO server.
- Source/HDKO/Security/HDKONetSecrets.h:put the server IP on the HDKO_DEFAULT_LOGIN_HOST line ("192.168.1.100") and keep port 15100.
- In the editor HDKO_DEV_LOCAL = 1. In every packaged build it is 0 and the client goes to production (wss://login.hd-ko.com:2053).
- To make a packaged build go to the LAN server, uncomment the //#define HDKO_DEV_LOCAL 1 line near the top of the file. Revert it before a release.
- The game server's IP and port are not in the client; they come from the login server's server list.
- HDKOCryptKeys.cpp: must hold the key that matches the server's seed (step 4).
9. Build and run the client
- Right-click HDKO.uproject and choose "Generate Visual Studio project files".
- Open HDKO.sln, select Development Editor | Win64 and build. Alternatively, double-click the uproject and answer "Yes".
- The editor opens with the IntroScreen map. The first launch spends a long time compiling shaders.
- Press Play, log in with a new ID and password (the account is created automatically), pick the server, create a character.
To make a packaged build:
The run.bat in the repo still points at UE_5.7; change it to UE_5.8 before using it.Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<you>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. Example: one PC as server, one PC as client
Server PC (192.168.1.100):
- Install PostgreSQL + ODBC and restore the 05.10.2026-clean.sql backup.
- Put the server key in place.
- Fix the build.bat paths and build until you see BUILD_ALL_OK.
- Create local.json (WS, crypto on, 0.0.0.0, serverIp=192.168.1.100).
- Open ports 15100 and 15572 in the firewall.
- Run Start.bat.
Client PC:
- Install UE 5.8 + VS, clone the repo with LFS.
- Set HDKO_OFFICIAL_SERVERS 0 and LOGIN_HOST="192.168.1.100"; the key must match the server.
- Build Development Editor and press Play.
The same steps work on a single PC; use 127.0.0.1 as the IP everywhere.
11. Common problems
- Connects, then drops immediately → The crypto keys do not match, or the server is set to crypto=false / TCP.
- Login works, entering the server hangs → serverIp / gamePort is wrong or port 15572 is closed.
- Server exits at startup with an ODBC error → The driver is not installed, or its name differs from the one in the config.
- Server exits at startup with "password authentication failed" → HDKO_PG_PASSWORD is not set or is wrong.
- pg_restore reports a version error → pg_restore is older than 18.
- Thousands of "Cannot open include" errors → The VS environment is not loaded. Do not use the old build_target.bat.
- .uasset files are a few hundred bytes, the project will not open → Cloned without LFS. Run git lfs install and git lfs pull.
Legal Notice and Disclaimer
This project is a non-profit, fan-made work created solely for educational, practice, and portfolio development purposes.안녕하세요 여러분,
- Intellectual Property: All concepts, characters, graphics, sound effects, music, and trademarks belonging to the original game are the property of the original rights holder. No rights or ownership are claimed over any of these elements.
- Intended Use: This repository and the source code within are shared exclusively to showcase software architecture, game mechanics, and programming practices. No direct or indirect financial gain or revenue is generated from this project.
- Takedown Request: If copyright or rights holders have any objections or requests regarding this project, the project and all related source code will be removed immediately upon notification.
- __________
취미로 진행해 오던 Unreal Engine 5.8 기반 프로젝트의 개발을 완료하여 공유합니다. 자세한 내용은 아래 링크에서 확인하실 수 있습니다. 누구나 필요에 맞게 서버와 클라이언트 양쪽 모두를 자유롭게 수정하고 커스텀할 수 있습니다. 수십 종의 에디터, 임포터(Importer), 익스포터(Exporter) 도구가 프로젝트에 포함되어 있어 입문자분들께 큰 도움이 될 것입니다. 모바일 환경이나 Mac 컴퓨터 어디서든 자유롭게 빌드하여 사용하실 수 있습니다.
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
처음부터 새로 제작된 클라이언트와 이에 완벽히 호환되도록 크로스 플랫폼용으로 바닥부터 개발된 서버입니다. 데이터베이스는 크로스 플랫폼 지원을 위해 PostgreSQL로 구축되었습니다. 이전 24xx 서버와도 호환되어 문제없이 접속 가능하며, 심지어 이 클라이언트로 오리지널 U*KO에 로그인할 수도 있습니다. 즉, Windows와 Linux 어디서나 서버를 원활하게 구동할 수 있습니다.
모든 에셋과 수천 개의 문서가 포함된 Git 링크입니다 (프로젝트 용량은 약 30GB 규모입니다). UKO / KOEKO의 모든 이벤트와 아이템이 프로젝트 내에 구현되어 있습니다.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
오랜 기간 함께 즐겨온 게임에 조금이나마 현대적인 업계 표준과 업데이트를 더하고자, 퀘스트를 포함한 서버 측 모든 코드는 5,000개 이상의 테스트를 거쳤습니다. 모든 Lua 스크립트 파일 역시 하나하나 면밀히 검수되었습니다. 원하시는 방향대로 멋지게 발전시켜 나가시길 바랍니다.
- HDKO 빌드 및 실행 가이드 (서버 + 클라이언트)
먼저 알아야 할 세 가지:
- 저장소에 포함된 development.json으로는 클라이언트가 접속할 수 없습니다. 이 파일은 TCP를 사용하 언트는 항상 WebSocket + HDKOCrypt를 사용합니다. 따라서 local.json을 직접 만들어야 합니다(6단계).
- 백업 파일은 .sql 확장자지만 일반 SQL이 아닙니다. PostgreSQL 18.4로 만든 pg_dump 커스텀 형식 아 없으며 pg_restore 18이 필요합니다.
- 서버 암호화 키는 저장소에 없습니다. 키 파일이 없다면 새 키 쌍을 생성해 양쪽에 붙여 넣어야 합니다.
1. 사전 요구 사항
양쪽 공통:
- Windows 10/11 x64
- Git 및 Git LFS. Content 폴더는 LFS에 저장되어 있습니다. LFS를 설치하지 않은 상태로 클론하면 .uasset 파일이 포인터로만 받아져 프로젝트가 열리지 않습니다.
- Visual Studio 2022 (17.8+) 또는 VS 2026
- 워크로드: "Desktop development with C++" 및 "Game development with C++"
- 구성 요소: MSVC x64, Windows SDK, "C++ CMake tools"(CMake와 Ninja 포함), .NET
- Python 3.10+, PATH에 등록. build.bat은 컴파일 전에 감사(audit) 스크립트를 실행하므로 Python이 없으면 빌드가 실패합니다.
서버 전용:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg 후 bootstrap-vcpkg.bat 실행. 첫 빌드 때 의존성을 자동으로 설치합니다.- PostgreSQL 18
- psqlODBC x64: ODBC 드라이버 목록에 이름이 정확히 "PostgreSQL Unicode(x64)"로 표시되어야 합니다.
- Node.js 20+: 선택 사항, 대시보드 전용.
클라이언트 전용:
- Unreal Engine 5.8
- 300 GB 이상의 여유 디스크 공간
- DX12 / SM6 지원 그래픽카드
2. 소스 받기
예시에서는 서버의 LAN IP를 192.168.1.100으로 사용합니다. 모든 곳에서 본인의 IP로 바꾸십시오.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. 데이터베이스
- PostgreSQL 18을 설치합니다. postgres 사용자에 비밀번호를 지정하고(예: hdko2026) 포트는 5432로 둡니다.
- psqlODBC x64를 설치합니다.
- 데이터베이스를 만들고 백업을 복원합니다:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql
백업 파일은 세 개입니다:
- 05.10.2026-clean.sql: 사용 중인 테이블 237개. 이 파일을 사용하십시오.
- 2026-10-05-dropped.sql: 폐기된 테이블 285개.
- 05.10.2026.sql: 두 파일의 합계, 테이블 522개.
백업 날짜는 2026.10.05입니다. 서버가 "테이블/컬럼 없음"으로 시작되지 않으면 이후에 추가된 migration이 빠진 것입니다. Server/docs/sql/README.md를 참고하십시오.
게임 계정: AUTO_REGISTER가 기본으로 켜져 있습니다. 처음 로그인할 때 입력한 ID와 비밀번호로 계정이 자동 생성됩니다.
4. 암호화 키 (양쪽이 일치해야 함)
- 클라이언트 측: Source/HDKO/Security/HDKOCryptKeys.cpp. git에 포함되어 있으며 고정된 공개 키가 들어 있습니다.
- 서버 측: Server/core/crypto/HDKOCryptServerKeys.h. git에 없으며 비밀 seed가 들어 있습니다. 템플릿은 .example 파일인데, 전부 0으로 채워져 있어 어떤 연결도 받지 않습니다.
서버 키 파일(HDKOCryptServerKeys.h)이 있다면 복사하기만 하면 됩니다. 없다면 새 키 쌍을 생성하십시오:
- "x64 Native Tools Command Prompt"에서 실행합니다:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txt새 키를 생성하면 이전 키로 빌드된 클라이언트는 더 이상 접속할 수 없습니다.
- CLIENT 블록을 HDKOCryptKeys.cpp에 붙여 넣습니다.
- SERVER 블록을 Server/core/crypto/HDKOCryptServerKeys.h에 붙여 넣습니다. 출력에는 "shared/..." 경로가 적혀 있지만 오래된 경로입니다.
- keys.txt를 삭제합니다.
5. 서버 빌드
Server/build.bat의 두 줄을 본인 환경에 맞게 수정합니다:
그다음 빌드합니다:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<사용자명>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- 순서: 감사 검사, cmake configure(첫 실행은 오래 걸림), 8개 병렬 작업으로 빌드, Server/release 폴더에 설치.
- 마지막 줄이 BUILD_ALL_OK이면 빌드 성공입니다.
/LIST]
6. 서버 설정
Start.bat은 config\local.json을 사용합니다. 이 파일은 git에 없으므로 직접 만들어야 합니다:
- development.json을 local.json이라는 이름으로 복사합니다.
- 아래 값들을 변경합니다.
- admin.bindAddress는 127.0.0.1로 둡니다. 9130 포트는 절대 외부에 열지 마십시오.
- 파일을 Server/release/config에 복사하거나 build.bat을 다시 실행합니다.
local.json에서 변경할 값:
- crypto.enabled → true
- login.net.transport 및 game.net.transport → "WS"
- login.net.bindAddress 및 game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp 및 serverIp → "192.168.1.100" (클라이언트에 전달되는 게임 서버 주소)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
비밀번호는 JSON이 아니라 환경 변수에 넣습니다:
- HDKO_PG_PASSWORD → 데이터베이스 비밀번호. Start.bat이 직접 hdko2026으로 설정합니다. 비밀번호가 다르면 해당 줄을 수정하십시오.
- HDKO_ADMIN_TOKEN → Admin API 및 대시보드
- HDKO_OPENROUTER_KEY → 봇 채팅, 선택 사항
7. 서버 시작
로그인 서버(포트 15100)와 게임 서버(포트 15572)가 각각 별도의 콘솔 창에서 실행됩니다.Kod:cd Server\release scripts\Start.bat
확인 목록:
- 콘솔에 "error" 줄이 없어야 합니다.
- curl localhost:9130/health 가 응답해야 합니다.
- 클라이언트가 다른 PC에 있다면 방화벽에서 TCP 15100 및 15572 인바운드 연결을 허용해야 합니다.
대시보드 (선택 사항):
- dashboard.bat의 DASH 경로를 수정합니다.
- .env.example을 .env로 복사합니다.
- dashboard.bat을 실행하고
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.을 엽니다. 처음 로그인한 사용자가 owner가 됩니다.
8. 클라이언트 설정[/CODE]
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS는 0이어야 합니다. 1이면 클라이언트가 공식 KO 서버에 접속합니다.
- Source/HDKO/Security/HDKONetSecrets.h:HDKO_DEFAULT_LOGIN_HOST 줄에 서버 IP("192.168.1.100")를 넣고 포트는 15100으로 둡니다.
- 에디터에서는 HDKO_DEV_LOCAL = 1입니다. 모든 패키지 빌드에서는 0이며 클라이언트가 프로덕션(wss://login.hd-ko.com:2053)으로 접속합니다.
- 패키지 빌드가 LAN 서버로 접속하게 하려면 파일 상단의 //#define HDKO_DEV_LOCAL 1 줄의 주석을 해제하십시오. 릴리스 전에 되돌려야 합니다.
- 게임 서버의 IP와 포트는 클라이언트에 적혀 있지 않으며 로그인 서버의 서버 목록에서 전달됩니다.
- HDKOCryptKeys.cpp: 서버의 seed와 일치하는 키가 들어 있어야 합니다(4단계).
저장소의 run.bat은 아직 UE_5.7 경로를 가리킵니다. 사용 전에 UE_5.8로 바꾸십시오.
10. 예시: 서버 PC 한 대, 클라이언트 PC 한 대
서버 PC (192.168.1.100):
- PostgreSQL + ODBC를 설치하고 05.10.2026-clean.sql 백업을 복원합니다.
- 서버 키를 제자리에 둡니다.
- build.bat 경로를 수정하고 BUILD_ALL_OK가 나올 때까지 빌드합니다.
- local.json을 만듭니다(WS, 암호화 켬, 0.0.0.0, serverIp=192.168.1.100).
- 방화벽에서 15100 및 15572 포트를 엽니다.
- Start.bat을 실행합니다.
클라이언트 PC:
- UE 5.8 + VS를 설치하고 LFS로 저장소를 클론합니다.
- HDKO_OFFICIAL_SERVERS 0, LOGIN_HOST="192.168.1.100"으로 설정합니다. 키가 서버와 일치해야 합니다.
- Development Editor로 빌드하고 Play를 누릅니다.
PC 한 대에서도 같은 절차가 적용됩니다. 모든 IP를 127.0.0.1로 사용하십시오.
11. 자주 발생하는 문제
- 접속 직후 바로 끊김 → 암호화 키가 일치하지 않거나 서버가 crypto=false / TCP로 설정되어 있습니다.
- 로그인은 되지만 서버 입장 시 멈춤 → serverIp / gamePort가 잘못되었거나 15572 포트가 닫혀 있습니다.
- 서버가 시작 시 ODBC 오류로 종료됨 → 드라이버가 설치되지 않았거나 이름이 설정 파일과 다릅니다.
- 서버가 시작 시 "password authentication failed"로 종료됨 → HDKO_PG_PASSWORD가 설정되지 않았거나 틀렸습니다.
- pg_restore 버전 오류 → pg_restore 버전이 18보다 낮습니다.
- 수천 개의 "Cannot open include" 오류 → VS 환경이 로드되지 않았습니다. 오래된 build_target.bat은 사용하지 마십시오.
- .uasset 파일이 수백 바이트이고 프로젝트가 열리지 않음 → LFS 없이 클론되었습니다. git lfs install 및 git lfs pull을 실행하십시오.
법적 고지 및 면책 조항 (Disclaimer)
본 프로젝트는 게임을 기반으로 한 교육, 연구 및 포트폴리오 개발 목적의 비영리 팬 메이드(fan-made) 작업물입니다.
- 지식재산권: 원작 게임에 관련된 모든 컨셉, 캐릭터, 그래픽, 음향 효과, 배경음악 및 상표권은 원 저작권자에게 있습니다. 본 프로젝트는 해당 요소들에 대해 어떠한 권리나 소유권도 주장하지 않습니다.
- 사용 목적: 본 저장소(Repository) 및 소스 코드는 순수하게 소프트웨어 아키텍처, 게임 메커니즘 및 프로그래밍 기법을 공유하고 시연하기 위한 목적으로만 배포되었습니다. 본 프로젝트를 통해 직·간접적인 어떠한 금전적 수익도 창출하지 않습니다.
- 삭제 요청: 저작권자 또는 권리권자의 이의 제기나 삭제 요청이 있을 경우, 통지를 받는 즉시 본 프로젝트와 관련 코드는 지체 없이 게시 중단 및 삭제 처리됩니다.
- ____________
大家好,
我们利用业余时间基于虚幻引擎 5.8 (Unreal Engine 5.8) 开发的项目现已完成,详情请见下方链接。任何人都可以根据自己的需求,对服务端和客户端进行全方位的修改与定制。项目中整合了数十种编辑器、导入器 (Importer) 和导出器 (Exporter) 工具,相信对新手朋友会大有帮助。无论您是想打包构建到移动端还是 Mac 电脑,均可自由运行。
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
本项目包含全新重构的客户端,以及为实现跨平台从零打造、与客户端完全匹配的服务端。为满足跨平台适配,数据库采用 PostgreSQL 编写。项目支持向下兼容 24xx 服务端,客户端均可无缝连接;甚至可以直接使用该客户端登录原版 U*KO。简而言之,无论在 Windows 还是 Linux 系统下都可以稳定运行服务端。
包含完整素材资源 (Assets) 和数千份文档的 Git 仓库链接如下(项目整体体积约为 30GB 左右)。UKO / KOEKO 的所有活动 (Events) 和道具 (Items) 均已包含在项目中。
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
为了给我们玩了多年的这款经典游戏注入现代行业标准与全新活力,服务端的所有代码均经过了 5000+ 项测试检验(涵盖各项任务逻辑),全部 Lua 脚本文件也都逐一进行了严格审查。祝大家开发愉快,尽情拓展!
- HDKO 编译与运行指南(服务器 + 客户端)
开始前须知三点:
- 仓库自带的 development.json 无法让客户端连接。该文件使用 TCP 且关闭了加密,而客户端始终使用 Web 动创建 local.json(第 6 步)。
- 备份文件虽然是 .sql 扩展名,但不是普通 SQL。它们是用 PostgreSQL 18.4 生成的 pg_dump 自定义格式归档。psql -f 无法读取,需要使用 pg_restore 18。
- 仓库中没有服务器加密密钥。如果您没有密钥文件,需要生成一对新密钥并分别粘贴到两端。
1. 前置要求
两端都需要:
- Windows 10/11 x64
- Git 和 Git LFS。Content 文件夹存放在 LFS 中。如果在未安装 LFS 的情况下克隆,.uasset 文件只会以指针形式下载,项目无法打开。
- Visual Studio 2022(17.8+)或 VS 2026
- 工作负载:"Desktop development with C++" 和 "Game development with C++"
- 组件:MSVC x64、Windows SDK、"C++ CMake tools"(提供 CMake 和 Ninja)、.NET
- Python 3.10+,并加入 PATH。build.bat 在编译前会运行审计脚本;没有 Python 编译会失败。
仅服务器:- vcpkg:git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg,然后运行 bootstrap-vcpkg.bat。首次编译时会自动安装依赖。- PostgreSQL 18
- psqlODBC x64:ODBC 驱动列表中的名称必须完全显示为 "PostgreSQL Unicode(x64)"。
- Node.js 20+:可选,仅用于 dashboard。
仅客户端:- Unreal Engine 5.8
- 300 GB 以上可用磁盘空间
- 支持 DX12 / SM6 的显卡
2. 获取源码
示例中服务器的局域网 IP 为 192.168.1.100,请在所有地方替换为您自己的 IP。Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. 数据库
- 安装 PostgreSQL 18。为 postgres 用户设置密码(示例:hdko2026),端口保持 5432。
- 安装 psqlODBC x64。
- 创建数据库并恢复备份:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
共有三个备份文件:备份日期为 2026.10.05。如果服务器提示"缺少表/列"而无法启动,说明缺少之后新增的 migration;请参阅 Server/docs/sql/README.md。
- 05.10.2026-clean.sql:237 张在用表。请使用此文件。
- 2026-10-05-dropped.sql:285 张废弃表。
- 05.10.2026.sql:两者合计,522 张表。
游戏账号:AUTO_REGISTER 默认开启。首次登录时会用您输入的 ID 和密码自动创建账号。
4. 加密密钥(两端必须匹配)如果您有服务器密钥文件(HDKOCryptServerKeys.h),直接复制进去即可。否则请生成新的密钥对:
- 客户端:Source/HDKO/Security/HDKOCryptKeys.cpp。已纳入 git,存放固定的公钥。
- 服务器:Server/core/crypto/HDKOCryptServerKeys.h。不在 git 中,存放私密 seed。模板为 .example 文件,内容全为零,因此不会接受任何连接。
- 在 "x64 Native Tools Command Prompt" 中运行:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txt生成新密钥后,用旧密钥编译的客户端将无法再连接。
- 将 CLIENT 块粘贴到 HDKOCryptKeys.cpp。
- 将 SERVER 块粘贴到 Server/core/crypto/HDKOCryptServerKeys.h。输出中写的是 "shared/..." 路径,但该路径已过时。
- 删除 keys.txt。
5. 编译服务器
按您的机器修改 Server/build.bat 中的两行:
然后编译:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<您的用户名>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- 依次执行:审计检查、cmake configure(首次较慢)、8 个并行任务编译、安装到 Server/release 文件夹。
- 最后一行为 BUILD_ALL_OK 即表示编译成功。
- 如果编译在没有错误信息的情况下中断,说明内存不足:执行 set HDKO_BUILD_JOBS=4 并关闭 Unreal 编辑器。
6. 服务器配置
Start.bat 使用 config\local.json。该文件不在 git 中,需要自己创建:
- 将 development.json 复制为 local.json。
- 修改下列值。
- admin.bindAddress 保持 127.0.0.1。切勿对外开放 9130 端口。
- 将文件复制到 Server/release/config,或重新运行 build.bat。
local.json 中需要修改的值:- crypto.enabled → true
- login.net.transport 和 game.net.transport → "WS"
- login.net.bindAddress 和 game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp 和 serverIp → "192.168.1.100"(发送给客户端的游戏服务器地址)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
密码写在环境变量中,而不是 JSON 中:- HDKO_PG_PASSWORD → 数据库密码。Start.bat 会自行设为 hdko2026;如果您的密码不同,请修改该行。
- HDKO_ADMIN_TOKEN → Admin API 和 dashboard
- HDKO_OPENROUTER_KEY → 机器人聊天,可选
7. 启动服务器
登录服务器(端口 15100)和游戏服务器(端口 15572)会在两个独立的控制台中打开。Kod:cd Server\release scripts\Start.bat
检查清单:打包版本:
- 控制台中不应出现 "error" 行。
- curl localhost:9130/health 应有响应。
- 如果客户端在另一台电脑上,防火墙必须允许 TCP 15100 和 15572 入站连接。
Dashboard(可选):- 修改 dashboard.bat 中的 DASH 路径。
- 将 .env.example 复制为 .env。
- 运行 dashboard.bat 并打开 http://localhost:4000。第一个登录的用户成为 owner。
8. 客户端设置- Source/HDKO/Defs/HDKOBuildConfig.h:HDKO_OFFICIAL_SERVERS 必须为 0。设为 1 时客户端会连接官方 KO 服务器。
- Source/HDKO/Security/HDKONetSecrets.h:在 HDKO_DEFAULT_LOGIN_HOST 行填入服务器 IP("192.168.1.100"),端口保持 15100。
- 在编辑器中 HDKO_DEV_LOCAL = 1。所有打包版本中为 0,客户端会连接生产服务器(wss://login.hd-ko.com:2053)。
- 若要让打包版本连接局域网服务器,请取消文件开头 //#define HDKO_DEV_LOCAL 1 这一行的注释。发布前请改回。
- 游戏服务器的 IP 和端口不写在客户端中,而是来自登录服务器的服务器列表。
- HDKOCryptKeys.cpp:必须包含与服务器 seed 匹配的密钥(第 4 步)。
9. 编译并运行客户端- 右键点击 HDKO.uproject,选择 "Generate Visual Studio project files"。
- 打开 HDKO.sln,选择 Development Editor | Win64 并编译。也可以双击 uproject 并选择 "Yes"。
- 编辑器会打开 IntroScreen 地图。首次启动时着色器编译耗时较长。
- 点击 Play,用新的 ID 和密码登录(账号自动创建),选择服务器,创建角色。
仓库中的 run.bat 仍指向 UE_5.7;使用前请改为 UE_5.8。Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<您的用户名>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. 示例:一台电脑作服务器,另一台作客户端
服务器电脑(192.168.1.100):单台电脑同样适用;所有 IP 均使用 127.0.0.1。
- 安装 PostgreSQL + ODBC,恢复 05.10.2026-clean.sql 备份。
- 放好服务器密钥。
- 修改 build.bat 中的路径,编译直到出现 BUILD_ALL_OK。
- 创建 local.json(WS、开启加密、0.0.0.0、serverIp=192.168.1.100)。
- 在防火墙中开放 15100 和 15572 端口。
- 运行 Start.bat。
客户端电脑:- 安装 UE 5.8 + VS,使用 LFS 克隆仓库。
- 设置 HDKO_OFFICIAL_SERVERS 0 和 LOGIN_HOST="192.168.1.100";密钥必须与服务器匹配。
- 编译 Development Editor,点击 Play。
11. 常见问题
- 连接后立即断开 → 加密密钥不匹配,或服务器设置为 crypto=false / TCP。
- 登录正常,进入服务器时卡住 → serverIp / gamePort 错误,或 15572 端口未开放。
- 服务器启动时因 ODBC 错误退出 → 未安装驱动,或驱动名称与配置中的不一致。
- 服务器启动时提示 "password authentication failed" → HDKO_PG_PASSWORD 未设置或错误。
- pg_restore 报版本错误 → pg_restore 版本低于 18。
- 出现数千条 "Cannot open include" 错误 → 未加载 VS 环境。不要使用旧的 build_target.bat。
- .uasset 文件只有几百字节,项目无法打开 → 克隆时未安装 LFS。运行 git lfs install 和 git lfs pull
法律声明与免责声明 (Disclaimer)
本项目为非营利性质的粉丝自制 (fan-made) 作品,仅供技术学习、实践交流及作品集展示使用。
- 知识产权: 原版游戏涉及的所有概念、角色、美术图像、音效、音乐及注册商标均归原版权方所有。本项目对上述任何元素均不主张任何权利或所有权。
- 使用目的: 本代码仓库 (Repository) 及其包含的源码仅用于展示软件架构、游戏机制和编程实践。本项目不存在任何直接或间接的商业盈利行为。
- 下架要求: 若版权方或权利持有人对此项目有任何异议或下架诉求,一经收到通知,本项目及所有相关源码将立即下架并删除。
teşekkürlerMerhaba arkadaşlar,
Unreal Engine 5.8 ile geliştirdiğimiz ve detaylarına aşağıdaki bağlantıdan ulaşabileceğiniz projemizi tamamlamış bulunuyoruz. İsteyen herkes, hem sunucu (server) hem de istemci (client) tarafını kendi ihtiyaçlarına göre dilediği gibi düzenleyebilir. Proje bünyesinde onlarca editör, importer ve exporter ile özellikle yeni başlayan geliştiricilere büyük fayda sağlayacağını düşünüyorum. Projeyi dilerseniz mobil platformlar için, dilerseniz Windows/Mac/Linux ortamında derleyip çalıştırabilirsiniz.
Çalışma süreci:Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
Sıfırdan yeniden geliştirilen istemci ve bu istemciyle tam uyumlu olacak biçimde platformlar arası (cross-platform) mimariyle baştan yazılmış bir sunucu. Veritabanı altyapısı, cross-platform uyumluluğunu sağlamak amacıyla PostgreSQL kullanıldı. Geriye dönük olarak 24xx sunucularla da uyumlu çalışacak şekilde tasarlanmıştır; istemci bu sunuculara sorunsuz bağlanabilir, hatta doğrudan orijinal U*KO sunucusuna giriş yapabilirsiniz. Kısacası sunucuyu ister Windows ister Linux işletim sistemlerinde rahatlıkla çalıştırabilirsiniz.
Tüm görsel/işitsel materyaller (asset) ve binlerce dokümantasyon dahil Git deposu bağlantısı aşağıdadır (yaklaşık 30 GB). U*KO ve KO*EKO'ya ait tüm etkinlikler (events) ve eşyalar (items) projede eksiksiz yer almaktadır.
1.9 GB kod ve dökümantasyon 30 GB Asset mevcut. İsterseniz sadece kod çekerek asseti daha sonra kendinizde tamamlayabilirsiniz.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
Yıllardır severek oynadığımız oyuna bir nebze de olsa güncelleme ve modern endüstri standardı kazandırmak istedik. Projede mevcut özellikleriyle, grafik, socket sistemi, paket kripto seviyesi modernize edildi muhtemelen bir çok ücretli versiyonda bulamayacağınız standarta getirildi. Sunucu tarafındaki tüm kodlar, görev sistemleri (quests) dahil olmak üzere 5.000'den fazla test ile denetlenmiştir; tüm Lua dosyaları tek tek incelenmiştir. %90 herşey dökümante edilmiş durumda.
Dilediğiniz gibi geliştirip genişletmeniz ve optimize etmeniz dileğiyle.
Deneyenlerden ve geliştirenlerden birer görsel alırız
Ekli dosyayı görüntüle 23596
Ekli dosyayı görüntüle 23630
Ekli dosyayı görüntüle 23631
HDKO Derleme ve Çalıştırma Kılavuzu (Sunucu + Client)
Önce bilinmesi gereken üç şey:
- Depoyla gelen development.json ile client bağlanamaz. O dosyada TCP var ve kripto kapalı. Client ise her zaman WebSocket ve HDKOCrypt kullanıyor. Bu yüzden local.json dosyasını elle oluşturmanız gerekiyor (6. adım).
- Yedekler .sql uzantılı ama düz SQL değil. pg_dump custom formatındalar ve PostgreSQL 18.4 ile alınmışlar. psql -f ile açılmazlar, pg_restore 18 gerekir.
- Sunucu kripto anahtarı depoda yok. Anahtar dosyası elinizde yoksa yeni bir çift üretip iki tarafa da yapıştırmanız gerekir.
1. Ön gereksinimler
Her iki taraf için:
- Windows 10/11 x64
HDKO Derleme ve Çalıştırma Kılavuzu (Sunucu + Client)
Önce bilinmesi gereken üç şey:
- Depoyla gelen development.json ile client bağlanamaz. O dosyada TCP var ve kripto kapalı. ClienHDKOCrypt kullanıyor. Bu yüzden local.json dosyasını elle oluşturmanız gerekiyor (6. adım).
- Yedekler .sql uzantılı ama düz SQL değil. pg_dump custom formatındalar ve PostgreSQL 18.4 ile alınmışlar. psql -f ile açılmazlar, pg_restore 18 gerekir.
- Sunucu kripto anahtarı depoda yok. Anahtar dosyası elinizde yoksa yeni bir çift üretip iki tarafa da yapıştırmanız gerekir.
1. Ön gereksinimler
Her iki taraf için:
- Windows 10/11 x64
- Git ve Git LFS. Content klasörü LFS'te. LFS kurulu değilken klonlarsanız .uasset dosyaları yalnızca işaretçi olarak iner ve proje açılmaz.
- Visual Studio 2022 (17.8+) veya VS 2026
- İş yükleri: "Desktop development with C++" ve "Game development with C++"
- Bileşenler: MSVC x64, Windows SDK, "C++ CMake tools" (CMake ve Ninja buradan gelir), .NET
- Python 3.10+, PATH'te olmalı. build.bat derlemeden önce audit scriptleri çalıştırıyor; Python yoksa build başarısız olur.
Sadece sunucu için:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg, ardından bootstrap-vcpkg.bat. Bağımlılıkları ilk derlemede kendisi kurar.- PostgreSQL 18
- psqlODBC x64: ODBC sürücü listesinde adı tam olarak "PostgreSQL Unicode(x64)" görünmeli.
- Node.js 20+: isteğe bağlı, yalnızca dashboard için.
Sadece client için:
- Unreal Engine 5.8
- 300 GB'tan fazla boş disk
- DX12 / SM6 destekli ekran kartı
2. Kaynağı indirme
Örneklerde sunucunun LAN IP'si 192.168.1.100 olarak geçiyor; her yerde kendi IP'nizi yazın.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. Veritabanı
- PostgreSQL 18'i kurun. postgres kullanıcısına bir şifre verin (örnek: hdko2026), port 5432 kalsın.
- psqlODBC x64'ü kurun.
- Veritabanını oluşturup yedeği geri yükleyin:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
Üç yedek dosyası var:
- 05.10.2026-clean.sql: 237 canlı tablo. Bunu kullanın.
- 2026-10-05-dropped.sql: 285 ölü tablo.
- 05.10.2026.sql: ikisinin toplamı, 522 tablo.
Yedekler 05.10.2026 tarihli. Sunucu "eksik tablo/kolon" diyerek açılmazsa sonradan eklenmiş bir migrationsql/README.md dosyasına bakın.
Oyun hesabı: AUTO_REGISTER varsayılan olarak açık. İlk girişte yazdığınız ID ve şifreyle hesap otomatik açılır.
4. Kripto anahtarları (iki tarafta eşleşmeli)
- Client tarafı: Source/HDKO/Security/HDKOCryptKeys.cpp. Git'te duruyor; sabitlenmiş public key burada.
- Sunucu tarafı: Server/core/crypto/HDKOCryptServerKeys.h. Git'te yok, gizli seed burada. Şablonu .example dosyası; içi sıfırlarla dolu olduğu için hiçbir bağlantıyı kabul etmez.
Elinizde sunucu anahtar dosyası (HDKOCryptServerKeys.h) varsa onu kopyalamanız yeterli. Yoksa yeni bir çift üretin:
- "x64 Native Tools Command Prompt" içinde çalıştırın:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txtYeni anahtar üretirseniz eski anahtarla derlenmiş client'lar artık bağlanamaz.
- CLIENT bloğunu HDKOCryptKeys.cpp dosyasına yapıştırın.
- SERVER bloğunu Server/core/crypto/HDKOCryptServerKeys.h dosyasına yapıştırın. Çıktıda "shared/..." yolu yazıyor ama o yol eski.
- keys.txt dosyasını silin.
5. Sunucuyu derleme
Server/build.bat içindeki iki satırı kendi makinenize göre düzeltin:
Sonra derleyin:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<siz>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- Sırasıyla audit kontrolleri, cmake configure (ilk sefer uzun sürer), 8 paralel işle derleme ve Server/release klasörüne kurulum yapar.
- Son satır BUILD_ALL_OK ise derleme başarılıdır.
- Derleme hata mesajı vermeden kesilirse bellek yetmemiştir: set HDKO_BUILD_JOBS=4 yapıp Unreal editörünü kapatın.
6. Sunucu config'i
Start.bat, config\local.json dosyasını kullanıyor. Bu dosya git'te yok, kendiniz oluşturacaksınız:
- development.json dosyasını local.json adıyla kopyalayın.
- Aşağıdaki değerleri değiştirin.
- admin.bindAddress değeri 127.0.0.1 olarak kalsın. 9130 portunu asla dışarı açmayın.
- Dosyayı Server/release/config klasörüne kopyalayın ya da build.bat'i tekrar çalıştırın.
local.json içinde değiştirilecek değerler:
- crypto.enabled → true
- login.net.transport ve game.net.transport → "WS"
- login.net.bindAddress ve game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp ve serverIp → "192.168.1.100" (client'a bildirilen oyun sunucusu adresi)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
Şifreler JSON'a değil, ortam değişkenlerine yazılır:
- HDKO_PG_PASSWORD → Veritabanı şifresi. Start.bat bunu hdko2026 olarak kendisi set ediyor; şifreniz farklıysa o satırı düzeltin.
- HDKO_ADMIN_TOKEN → Admin API ve dashboard
- HDKO_OPENROUTER_KEY → Bot sohbeti, isteğe bağlı
7. Sunucuyu başlatma
Login sunucusu 15100, game sunucusu 15572 portunda iki ayrı konsolda açılır.Kod:cd Server\release scripts\Start.bat
Kontrol listesi:
- Konsollarda "error" satırı olmamalı.
- curl localhost:9130/health cevap vermeli.
- Client başka bir PC'deyse güvenlik duvarında TCP 15100 ve 15572 gelen bağlantılara açık olmalı.
Dashboard (isteğe bağlı):
- dashboard.bat içindeki DASH yolunu düzeltin.
- .env.example dosyasını .env olarak kopyalayın.
- dashboard.bat'i çalıştırıp
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.adresini açın. İlk giren kullanıcı owner olur.
8. Client ayarları
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS 0 olmalı. 1 olursa resmi KO sunucusun
- Source/HDKO/Security/HDKONetSecrets.h:HDKO_DEFAULT_LOGIN_HOST satırına sunucu IP'sini yazın ("192.168.1.100"), port 15100 kalsın.
- Editörde HDKO_DEV_LOCAL = 1 olur. Paketlenmiş build'lerin hepsinde 0 olur ve client production'a (wss://login.hd-ko.com:2053) gider.
- Paket build'in LAN sunucusuna gitmesi için dosyanın başındaki //#define HDKO_DEV_LOCAL 1 satırının yorumunu kaldırın. Release öncesi geri alın.
- Oyun sunucusunun IP'si ve portu client'ta yazmıyor; login sunucusunun server listesinden gelir.
- HDKOCryptKeys.cpp: sunucunun seed'iyle eşleşen anahtar burada olmalı (4. adım).
9. Client'ı derleme ve çalıştırma
- HDKO.uproject dosyasına sağ tıklayıp "Generate Visual Studio project files" seçin.
- HDKO.sln'yi açın, Development Editor | Win64 seçip derleyin. Alternatif olarak uproject'e çift
- Editör IntroScreen haritasıyla açılır. İlk açılışta shader derlemesi uzun sürer.
- Play'e basın, yeni bir ID ve şifreyle girin (hesap otomatik açılır), sunucuyu seçin, karakter oluşturun.
Paket build almak için:
Depodaki run.bat hâlâ UE_5.7 yolunu gösteriyor; kullanmadan önce UE_5.8 yapın.Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<siz>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. Örnek senaryo: biri sunucu, biri client iki PC
Sunucu PC (192.168.1.100):
- PostgreSQL + ODBC kurup 05.10.2026-clean.sql yedeğini geri yükleyin.
- Sunucu anahtarını yerine koyun.
- build.bat yollarını düzeltip BUILD_ALL_OK görene kadar derleyin.
- local.json'u oluşturun (WS, kripto açık, 0.0.0.0, serverIp=192.168.1.100).
- Güvenlik duvarında 15100 ve 15572 portlarını açın.
- Start.bat'i çalıştırın.
Client PC:
- UE 5.8 + VS kurun, depoyu LFS ile klonlayın.
- HDKO_OFFICIAL_SERVERS 0, LOGIN_HOST="192.168.1.100" ayarlayın; anahtar sunucuyla eşleşsin.
- Development Editor ile derleyin, Play'e basın.
Tek PC'de de aynı adımlar geçerli; IP olarak her yerde 127.0.0.1 kullanın.
11. Sık karşılaşılan sorunlar
- Bağlanıyor, hemen kopuyor → Kripto anahtarları uyuşmuyor ya da sunucuda crypto=false / TCP ayar
- Login çalışıyor, sunucuya girişte takılıyor → serverIp / gamePort yanlış veya 15572 portu kapalı.
- Sunucu açılışta ODBC hatasıyla kapanıyor → Sürücü kurulu değil ya da adı config'teki adla aynı
- Sunucu açılışta "password authentication failed" diyor → HDKO_PG_PASSWORD set edilmemiş veya yanlış.
- pg_restore sürüm hatası veriyor → pg_restore sürümü 18'den eski.
- Binlerce "Cannot open include" hatası → VS ortamı yüklenmemiş. Eski build_target.bat'i kullanmayın.
- .uasset dosyaları birkaç yüz bayt, proje açılmıyor → LFS kurulmadan klonlanmış. git lfs install ve git lfs pull çalıştırın.
Yasal Uyarı ve Hak Bildirimi (Disclaimer)
Bu proje; eğitim, pratik ve portföy geliştirme amacıyla hazırlanmış, kâr amacı gütmeyen, hayran yapımı (fan-made) bir çalışmadır._______
- Fikri Mülkiyet: Oyuna ait tüm konsept, karakterler, görseller, ses efektleri, müzikler ve ticari markalar orijinal hak sahibine aittir. Bu unsurlar üzerinde hiçbir hak veya mülkiyet iddia edilmemektedir.
- Kullanım Amacı: Bu depo (repository) ve içindeki kaynak kodları yalnızca yazılım mimarisi, oyun mekanikleri ve programlama pratiklerini sergilemek üzere paylaşılmıştır. Projeden doğrudan veya dolaylı hiçbir maddi kazanç/gelir elde edilmemektedir.
- Kaldırma Talebi: Telif veya hak sahiplerinin projeyle ilgili herhangi bir itirazı ya da talebi olması halinde, bildirim yapıldığı anda proje ve tüm kaynak kodları derhal yayından kaldırılacaktır.
Hello everyone,
We have completed the hobby development of our project built in Unreal Engine 5.8, with details provided in the link below. Anyone is free to customize and modify both the server and client sides completely to their needs. I believe this will be very useful for beginners, as dozens of editors, importers, and exporters are included in the project. Feel free to build and run it on mobile or Mac.
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
A client rebuilt from scratch and a server built from the ground up for cross-platform compatibility, fully matched with the client. The database was implemented using PostgreSQL for cross-platform support. It can also be used backward-compatibly with 24xx servers; the client connects without issues. In fact, you can even log into official U*KO using this client. In short, you can run the server on either Windows or Linux.
Git repository link including all assets and thousands of documents (the project size is around ~30 GB). All events and items from UKO / KOEKO are included in the project.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
It would be wonderful to bring modern industry standards and a fresh update to the game we have played for years. For this reason, all server-side code is verified with 5,000+ tests, including quests. Every single Lua file has been inspected individually. Wishing you all the best in developing it as you wish.- HDKO Build and Run Guide (Server + Client)
Three things to know first:
- The client cannot connect with the development.json that ships in the repo. That file uses TCP with crypto off, while the client always speaks WebSocket + HDKOCrypt. You have to create local.json by hand (step 6).
- The backups have a .sql extension but are not plain SQL. They are pg_dump custom-format archives made with PostgreSQL 18.4. psql -f cannot read them; you need pg_restore 18.
- The server crypto key is not in the repo. If you do not have the key file, generate a new pair and paste it into both ends.
1. Prerequisites
Both sides:
- Windows 10/11 x64
- Git and Git LFS. The Content folder is stored in LFS. If you clone without LFS installed, the .uasset files arrive as pointers only and the project will not open.
- Visual Studio 2022 (17.8+) or VS 2026
- Workloads: "Desktop development with C++" and "Game development with C++"
- Components: MSVC x64, Windows SDK, "C++ CMake tools" (provides CMake and Ninja), .NET
- Python 3.10+ on PATH. build.bat runs audit scripts before compiling; without Python the build fails.
Server only:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg, then bootstrap-vcpkg.bat. It installs the dependencies by itself on the first build.- PostgreSQL 18
- psqlODBC x64: the ODBC driver list must show the name exactly as "PostgreSQL Unicode(x64)".
- Node.js 20+: optional, dashboard only.
Client only:
- Unreal Engine 5.8
- 300 GB+ free disk
- DX12 / SM6 capable GPU
2. Get the source
The examples use 192.168.1.100 as the server's LAN IP; substitute your own everywhere.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. Database
- Install PostgreSQL 18. Give the postgres user a password (example: hdko2026) and keep port 5432.
- Install psqlODBC x64.
- Create the database and restore the backup:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
There are three backup files:
- 05.10.2026-clean.sql: 237 live tables. Use this one.
- 2026-10-05-dropped.sql: 285 dead tables.
- 05.10.2026.sql: both together, 522 tables.
The backups are dated 05.10.2026. If the server refuses to start with "missing table/column", a later migration is missing; see Server/docs/sql/README.md.
Game account: AUTO_REGISTER is on by default. On the first login the account is created with the ID and password you type.
4. Crypto keys (must match on both ends)
- Client side: Source/HDKO/Security/HDKOCryptKeys.cpp. Tracked in git; holds the pinned public key.
- Server side: Server/core/crypto/HDKOCryptServerKeys.h. Not in git; holds the secret seed. Its template is the .example file, which is all zeros and therefore accepts no connections.
If you have the server key file (HDKOCryptServerKeys.h), just copy it in. Otherwise generate a new pair:
- Run inside an "x64 Native Tools Command Prompt":
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txtIf you generate a new key, clients built with the old key can no longer connect.
- Paste the CLIENT block into HDKOCryptKeys.cpp.
- Paste the SERVER block into Server/core/crypto/HDKOCryptServerKeys.h. The output mentions a "shared/..." path, but that path is out of date.
- Delete keys.txt.
5. Build the server
Fix these two lines in Server/build.bat for your machine:
Then build:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<you>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- In order: audit checks, cmake configure (slow the first time), build with 8 parallel jobs, install into the Server/release folder.
- The build succeeded if the last line is BUILD_ALL_OK.
- If the build stops without an error message, memory ran out: set HDKO_BUILD_JOBS=4 and close the Unreal editor.
6. Server config
Start.bat uses config\local.json. That file is not in git, so you create it:
- Copy development.json as local.json.
- Change the values below.
- Keep admin.bindAddress at 127.0.0.1. Never expose port 9130.
- Copy the file into Server/release/config, or run build.bat again.
Values to change in local.json:
- crypto.enabled → true
- login.net.transport and game.net.transport → "WS"
- login.net.bindAddress and game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp and serverIp → "192.168.1.100" (the game server address sent to the client)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
Passwords go in environment variables, not in the JSON:
- HDKO_PG_PASSWORD → Database password. Start.bat sets it to hdko2026 itself; fix that line if your password differs.
- HDKO_ADMIN_TOKEN → Admin API and dashboard
- HDKO_OPENROUTER_KEY → Bot chat, optional
7. Start the server
The login server (port 15100) and the game server (port 15572) open in two separate consoles.Kod:cd Server\release scripts\Start.bat
Checklist:
- No "error" lines in the consoles.
- curl localhost:9130/health should answer.
- If the client is on another PC, the firewall must allow incoming TCP 15100 and 15572.
Dashboard (optional):
- Fix the DASH path in dashboard.bat.
- Copy .env.example as .env.
- Run dashboard.bat and open
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.. The first user to sign in becomes the owner.
8. Client settings
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS must be 0. With 1 the client connects to the official KO server.
- Source/HDKO/Security/HDKONetSecrets.h:put the server IP on the HDKO_DEFAULT_LOGIN_HOST line ("192.168.1.100") and keep port 15100.
- In the editor HDKO_DEV_LOCAL = 1. In every packaged build it is 0 and the client goes to production (wss://login.hd-ko.com:2053).
- To make a packaged build go to the LAN server, uncomment the //#define HDKO_DEV_LOCAL 1 line near the top of the file. Revert it before a release.
- The game server's IP and port are not in the client; they come from the login server's server list.
- HDKOCryptKeys.cpp: must hold the key that matches the server's seed (step 4).
9. Build and run the client
- Right-click HDKO.uproject and choose "Generate Visual Studio project files".
- Open HDKO.sln, select Development Editor | Win64 and build. Alternatively, double-click the uproject and answer "Yes".
- The editor opens with the IntroScreen map. The first launch spends a long time compiling shaders.
- Press Play, log in with a new ID and password (the account is created automatically), pick the server, create a character.
To make a packaged build:
The run.bat in the repo still points at UE_5.7; change it to UE_5.8 before using it.Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<you>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. Example: one PC as server, one PC as client
Server PC (192.168.1.100):
- Install PostgreSQL + ODBC and restore the 05.10.2026-clean.sql backup.
- Put the server key in place.
- Fix the build.bat paths and build until you see BUILD_ALL_OK.
- Create local.json (WS, crypto on, 0.0.0.0, serverIp=192.168.1.100).
- Open ports 15100 and 15572 in the firewall.
- Run Start.bat.
Client PC:
- Install UE 5.8 + VS, clone the repo with LFS.
- Set HDKO_OFFICIAL_SERVERS 0 and LOGIN_HOST="192.168.1.100"; the key must match the server.
- Build Development Editor and press Play.
The same steps work on a single PC; use 127.0.0.1 as the IP everywhere.
11. Common problems
- Connects, then drops immediately → The crypto keys do not match, or the server is set to crypto=false / TCP.
- Login works, entering the server hangs → serverIp / gamePort is wrong or port 15572 is closed.
- Server exits at startup with an ODBC error → The driver is not installed, or its name differs from the one in the config.
- Server exits at startup with "password authentication failed" → HDKO_PG_PASSWORD is not set or is wrong.
- pg_restore reports a version error → pg_restore is older than 18.
- Thousands of "Cannot open include" errors → The VS environment is not loaded. Do not use the old build_target.bat.
- .uasset files are a few hundred bytes, the project will not open → Cloned without LFS. Run git lfs install and git lfs pull.
Legal Notice and Disclaimer
This project is a non-profit, fan-made work created solely for educational, practice, and portfolio development purposes.안녕하세요 여러분,
- Intellectual Property: All concepts, characters, graphics, sound effects, music, and trademarks belonging to the original game are the property of the original rights holder. No rights or ownership are claimed over any of these elements.
- Intended Use: This repository and the source code within are shared exclusively to showcase software architecture, game mechanics, and programming practices. No direct or indirect financial gain or revenue is generated from this project.
- Takedown Request: If copyright or rights holders have any objections or requests regarding this project, the project and all related source code will be removed immediately upon notification.
- __________
취미로 진행해 오던 Unreal Engine 5.8 기반 프로젝트의 개발을 완료하여 공유합니다. 자세한 내용은 아래 링크에서 확인하실 수 있습니다. 누구나 필요에 맞게 서버와 클라이언트 양쪽 모두를 자유롭게 수정하고 커스텀할 수 있습니다. 수십 종의 에디터, 임포터(Importer), 익스포터(Exporter) 도구가 프로젝트에 포함되어 있어 입문자분들께 큰 도움이 될 것입니다. 모바일 환경이나 Mac 컴퓨터 어디서든 자유롭게 빌드하여 사용하실 수 있습니다.
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
처음부터 새로 제작된 클라이언트와 이에 완벽히 호환되도록 크로스 플랫폼용으로 바닥부터 개발된 서버입니다. 데이터베이스는 크로스 플랫폼 지원을 위해 PostgreSQL로 구축되었습니다. 이전 24xx 서버와도 호환되어 문제없이 접속 가능하며, 심지어 이 클라이언트로 오리지널 U*KO에 로그인할 수도 있습니다. 즉, Windows와 Linux 어디서나 서버를 원활하게 구동할 수 있습니다.
모든 에셋과 수천 개의 문서가 포함된 Git 링크입니다 (프로젝트 용량은 약 30GB 규모입니다). UKO / KOEKO의 모든 이벤트와 아이템이 프로젝트 내에 구현되어 있습니다.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
오랜 기간 함께 즐겨온 게임에 조금이나마 현대적인 업계 표준과 업데이트를 더하고자, 퀘스트를 포함한 서버 측 모든 코드는 5,000개 이상의 테스트를 거쳤습니다. 모든 Lua 스크립트 파일 역시 하나하나 면밀히 검수되었습니다. 원하시는 방향대로 멋지게 발전시켜 나가시길 바랍니다.
- HDKO 빌드 및 실행 가이드 (서버 + 클라이언트)
먼저 알아야 할 세 가지:
- 저장소에 포함된 development.json으로는 클라이언트가 접속할 수 없습니다. 이 파일은 TCP를 사용하 언트는 항상 WebSocket + HDKOCrypt를 사용합니다. 따라서 local.json을 직접 만들어야 합니다(6단계).
- 백업 파일은 .sql 확장자지만 일반 SQL이 아닙니다. PostgreSQL 18.4로 만든 pg_dump 커스텀 형식 아 없으며 pg_restore 18이 필요합니다.
- 서버 암호화 키는 저장소에 없습니다. 키 파일이 없다면 새 키 쌍을 생성해 양쪽에 붙여 넣어야 합니다.
1. 사전 요구 사항
양쪽 공통:
- Windows 10/11 x64
- Git 및 Git LFS. Content 폴더는 LFS에 저장되어 있습니다. LFS를 설치하지 않은 상태로 클론하면 .uasset 파일이 포인터로만 받아져 프로젝트가 열리지 않습니다.
- Visual Studio 2022 (17.8+) 또는 VS 2026
- 워크로드: "Desktop development with C++" 및 "Game development with C++"
- 구성 요소: MSVC x64, Windows SDK, "C++ CMake tools"(CMake와 Ninja 포함), .NET
- Python 3.10+, PATH에 등록. build.bat은 컴파일 전에 감사(audit) 스크립트를 실행하므로 Python이 없으면 빌드가 실패합니다.
서버 전용:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg 후 bootstrap-vcpkg.bat 실행. 첫 빌드 때 의존성을 자동으로 설치합니다.- PostgreSQL 18
- psqlODBC x64: ODBC 드라이버 목록에 이름이 정확히 "PostgreSQL Unicode(x64)"로 표시되어야 합니다.
- Node.js 20+: 선택 사항, 대시보드 전용.
클라이언트 전용:
- Unreal Engine 5.8
- 300 GB 이상의 여유 디스크 공간
- DX12 / SM6 지원 그래픽카드
2. 소스 받기
예시에서는 서버의 LAN IP를 192.168.1.100으로 사용합니다. 모든 곳에서 본인의 IP로 바꾸십시오.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. 데이터베이스
- PostgreSQL 18을 설치합니다. postgres 사용자에 비밀번호를 지정하고(예: hdko2026) 포트는 5432로 둡니다.
- psqlODBC x64를 설치합니다.
- 데이터베이스를 만들고 백업을 복원합니다:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql
백업 파일은 세 개입니다:
- 05.10.2026-clean.sql: 사용 중인 테이블 237개. 이 파일을 사용하십시오.
- 2026-10-05-dropped.sql: 폐기된 테이블 285개.
- 05.10.2026.sql: 두 파일의 합계, 테이블 522개.
백업 날짜는 2026.10.05입니다. 서버가 "테이블/컬럼 없음"으로 시작되지 않으면 이후에 추가된 migration이 빠진 것입니다. Server/docs/sql/README.md를 참고하십시오.
게임 계정: AUTO_REGISTER가 기본으로 켜져 있습니다. 처음 로그인할 때 입력한 ID와 비밀번호로 계정이 자동 생성됩니다.
4. 암호화 키 (양쪽이 일치해야 함)
- 클라이언트 측: Source/HDKO/Security/HDKOCryptKeys.cpp. git에 포함되어 있으며 고정된 공개 키가 들어 있습니다.
- 서버 측: Server/core/crypto/HDKOCryptServerKeys.h. git에 없으며 비밀 seed가 들어 있습니다. 템플릿은 .example 파일인데, 전부 0으로 채워져 있어 어떤 연결도 받지 않습니다.
서버 키 파일(HDKOCryptServerKeys.h)이 있다면 복사하기만 하면 됩니다. 없다면 새 키 쌍을 생성하십시오:
- "x64 Native Tools Command Prompt"에서 실행합니다:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txt새 키를 생성하면 이전 키로 빌드된 클라이언트는 더 이상 접속할 수 없습니다.
- CLIENT 블록을 HDKOCryptKeys.cpp에 붙여 넣습니다.
- SERVER 블록을 Server/core/crypto/HDKOCryptServerKeys.h에 붙여 넣습니다. 출력에는 "shared/..." 경로가 적혀 있지만 오래된 경로입니다.
- keys.txt를 삭제합니다.
5. 서버 빌드
Server/build.bat의 두 줄을 본인 환경에 맞게 수정합니다:
그다음 빌드합니다:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<사용자명>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- 순서: 감사 검사, cmake configure(첫 실행은 오래 걸림), 8개 병렬 작업으로 빌드, Server/release 폴더에 설치.
- 마지막 줄이 BUILD_ALL_OK이면 빌드 성공입니다.
/LIST]
6. 서버 설정
Start.bat은 config\local.json을 사용합니다. 이 파일은 git에 없으므로 직접 만들어야 합니다:
- development.json을 local.json이라는 이름으로 복사합니다.
- 아래 값들을 변경합니다.
- admin.bindAddress는 127.0.0.1로 둡니다. 9130 포트는 절대 외부에 열지 마십시오.
- 파일을 Server/release/config에 복사하거나 build.bat을 다시 실행합니다.
local.json에서 변경할 값:
- crypto.enabled → true
- login.net.transport 및 game.net.transport → "WS"
- login.net.bindAddress 및 game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp 및 serverIp → "192.168.1.100" (클라이언트에 전달되는 게임 서버 주소)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
비밀번호는 JSON이 아니라 환경 변수에 넣습니다:
- HDKO_PG_PASSWORD → 데이터베이스 비밀번호. Start.bat이 직접 hdko2026으로 설정합니다. 비밀번호가 다르면 해당 줄을 수정하십시오.
- HDKO_ADMIN_TOKEN → Admin API 및 대시보드
- HDKO_OPENROUTER_KEY → 봇 채팅, 선택 사항
7. 서버 시작
로그인 서버(포트 15100)와 게임 서버(포트 15572)가 각각 별도의 콘솔 창에서 실행됩니다.Kod:cd Server\release scripts\Start.bat
확인 목록:
- 콘솔에 "error" 줄이 없어야 합니다.
- curl localhost:9130/health 가 응답해야 합니다.
- 클라이언트가 다른 PC에 있다면 방화벽에서 TCP 15100 및 15572 인바운드 연결을 허용해야 합니다.
대시보드 (선택 사항):
- dashboard.bat의 DASH 경로를 수정합니다.
- .env.example을 .env로 복사합니다.
- dashboard.bat을 실행하고
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.을 엽니다. 처음 로그인한 사용자가 owner가 됩니다.
8. 클라이언트 설정[/CODE]
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS는 0이어야 합니다. 1이면 클라이언트가 공식 KO 서버에 접속합니다.
- Source/HDKO/Security/HDKONetSecrets.h:HDKO_DEFAULT_LOGIN_HOST 줄에 서버 IP("192.168.1.100")를 넣고 포트는 15100으로 둡니다.
- 에디터에서는 HDKO_DEV_LOCAL = 1입니다. 모든 패키지 빌드에서는 0이며 클라이언트가 프로덕션(wss://login.hd-ko.com:2053)으로 접속합니다.
- 패키지 빌드가 LAN 서버로 접속하게 하려면 파일 상단의 //#define HDKO_DEV_LOCAL 1 줄의 주석을 해제하십시오. 릴리스 전에 되돌려야 합니다.
- 게임 서버의 IP와 포트는 클라이언트에 적혀 있지 않으며 로그인 서버의 서버 목록에서 전달됩니다.
- HDKOCryptKeys.cpp: 서버의 seed와 일치하는 키가 들어 있어야 합니다(4단계).
저장소의 run.bat은 아직 UE_5.7 경로를 가리킵니다. 사용 전에 UE_5.8로 바꾸십시오.
10. 예시: 서버 PC 한 대, 클라이언트 PC 한 대
서버 PC (192.168.1.100):
- PostgreSQL + ODBC를 설치하고 05.10.2026-clean.sql 백업을 복원합니다.
- 서버 키를 제자리에 둡니다.
- build.bat 경로를 수정하고 BUILD_ALL_OK가 나올 때까지 빌드합니다.
- local.json을 만듭니다(WS, 암호화 켬, 0.0.0.0, serverIp=192.168.1.100).
- 방화벽에서 15100 및 15572 포트를 엽니다.
- Start.bat을 실행합니다.
클라이언트 PC:
- UE 5.8 + VS를 설치하고 LFS로 저장소를 클론합니다.
- HDKO_OFFICIAL_SERVERS 0, LOGIN_HOST="192.168.1.100"으로 설정합니다. 키가 서버와 일치해야 합니다.
- Development Editor로 빌드하고 Play를 누릅니다.
PC 한 대에서도 같은 절차가 적용됩니다. 모든 IP를 127.0.0.1로 사용하십시오.
11. 자주 발생하는 문제
- 접속 직후 바로 끊김 → 암호화 키가 일치하지 않거나 서버가 crypto=false / TCP로 설정되어 있습니다.
- 로그인은 되지만 서버 입장 시 멈춤 → serverIp / gamePort가 잘못되었거나 15572 포트가 닫혀 있습니다.
- 서버가 시작 시 ODBC 오류로 종료됨 → 드라이버가 설치되지 않았거나 이름이 설정 파일과 다릅니다.
- 서버가 시작 시 "password authentication failed"로 종료됨 → HDKO_PG_PASSWORD가 설정되지 않았거나 틀렸습니다.
- pg_restore 버전 오류 → pg_restore 버전이 18보다 낮습니다.
- 수천 개의 "Cannot open include" 오류 → VS 환경이 로드되지 않았습니다. 오래된 build_target.bat은 사용하지 마십시오.
- .uasset 파일이 수백 바이트이고 프로젝트가 열리지 않음 → LFS 없이 클론되었습니다. git lfs install 및 git lfs pull을 실행하십시오.
법적 고지 및 면책 조항 (Disclaimer)
본 프로젝트는 게임을 기반으로 한 교육, 연구 및 포트폴리오 개발 목적의 비영리 팬 메이드(fan-made) 작업물입니다.
- 지식재산권: 원작 게임에 관련된 모든 컨셉, 캐릭터, 그래픽, 음향 효과, 배경음악 및 상표권은 원 저작권자에게 있습니다. 본 프로젝트는 해당 요소들에 대해 어떠한 권리나 소유권도 주장하지 않습니다.
- 사용 목적: 본 저장소(Repository) 및 소스 코드는 순수하게 소프트웨어 아키텍처, 게임 메커니즘 및 프로그래밍 기법을 공유하고 시연하기 위한 목적으로만 배포되었습니다. 본 프로젝트를 통해 직·간접적인 어떠한 금전적 수익도 창출하지 않습니다.
- 삭제 요청: 저작권자 또는 권리권자의 이의 제기나 삭제 요청이 있을 경우, 통지를 받는 즉시 본 프로젝트와 관련 코드는 지체 없이 게시 중단 및 삭제 처리됩니다.
- ____________
大家好,
我们利用业余时间基于虚幻引擎 5.8 (Unreal Engine 5.8) 开发的项目现已完成,详情请见下方链接。任何人都可以根据自己的需求,对服务端和客户端进行全方位的修改与定制。项目中整合了数十种编辑器、导入器 (Importer) 和导出器 (Exporter) 工具,相信对新手朋友会大有帮助。无论您是想打包构建到移动端还是 Mac 电脑,均可自由运行。
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
本项目包含全新重构的客户端,以及为实现跨平台从零打造、与客户端完全匹配的服务端。为满足跨平台适配,数据库采用 PostgreSQL 编写。项目支持向下兼容 24xx 服务端,客户端均可无缝连接;甚至可以直接使用该客户端登录原版 U*KO。简而言之,无论在 Windows 还是 Linux 系统下都可以稳定运行服务端。
包含完整素材资源 (Assets) 和数千份文档的 Git 仓库链接如下(项目整体体积约为 30GB 左右)。UKO / KOEKO 的所有活动 (Events) 和道具 (Items) 均已包含在项目中。
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
为了给我们玩了多年的这款经典游戏注入现代行业标准与全新活力,服务端的所有代码均经过了 5000+ 项测试检验(涵盖各项任务逻辑),全部 Lua 脚本文件也都逐一进行了严格审查。祝大家开发愉快,尽情拓展!
- HDKO 编译与运行指南(服务器 + 客户端)
开始前须知三点:
- 仓库自带的 development.json 无法让客户端连接。该文件使用 TCP 且关闭了加密,而客户端始终使用 Web 动创建 local.json(第 6 步)。
- 备份文件虽然是 .sql 扩展名,但不是普通 SQL。它们是用 PostgreSQL 18.4 生成的 pg_dump 自定义格式归档。psql -f 无法读取,需要使用 pg_restore 18。
- 仓库中没有服务器加密密钥。如果您没有密钥文件,需要生成一对新密钥并分别粘贴到两端。
1. 前置要求
两端都需要:
- Windows 10/11 x64
- Git 和 Git LFS。Content 文件夹存放在 LFS 中。如果在未安装 LFS 的情况下克隆,.uasset 文件只会以指针形式下载,项目无法打开。
- Visual Studio 2022(17.8+)或 VS 2026
- 工作负载:"Desktop development with C++" 和 "Game development with C++"
- 组件:MSVC x64、Windows SDK、"C++ CMake tools"(提供 CMake 和 Ninja)、.NET
- Python 3.10+,并加入 PATH。build.bat 在编译前会运行审计脚本;没有 Python 编译会失败。
仅服务器:- vcpkg:git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg,然后运行 bootstrap-vcpkg.bat。首次编译时会自动安装依赖。- PostgreSQL 18
- psqlODBC x64:ODBC 驱动列表中的名称必须完全显示为 "PostgreSQL Unicode(x64)"。
- Node.js 20+:可选,仅用于 dashboard。
仅客户端:- Unreal Engine 5.8
- 300 GB 以上可用磁盘空间
- 支持 DX12 / SM6 的显卡
2. 获取源码
示例中服务器的局域网 IP 为 192.168.1.100,请在所有地方替换为您自己的 IP。Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. 数据库
- 安装 PostgreSQL 18。为 postgres 用户设置密码(示例:hdko2026),端口保持 5432。
- 安装 psqlODBC x64。
- 创建数据库并恢复备份:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
共有三个备份文件:备份日期为 2026.10.05。如果服务器提示"缺少表/列"而无法启动,说明缺少之后新增的 migration;请参阅 Server/docs/sql/README.md。
- 05.10.2026-clean.sql:237 张在用表。请使用此文件。
- 2026-10-05-dropped.sql:285 张废弃表。
- 05.10.2026.sql:两者合计,522 张表。
游戏账号:AUTO_REGISTER 默认开启。首次登录时会用您输入的 ID 和密码自动创建账号。
4. 加密密钥(两端必须匹配)如果您有服务器密钥文件(HDKOCryptServerKeys.h),直接复制进去即可。否则请生成新的密钥对:
- 客户端:Source/HDKO/Security/HDKOCryptKeys.cpp。已纳入 git,存放固定的公钥。
- 服务器:Server/core/crypto/HDKOCryptServerKeys.h。不在 git 中,存放私密 seed。模板为 .example 文件,内容全为零,因此不会接受任何连接。
- 在 "x64 Native Tools Command Prompt" 中运行:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txt生成新密钥后,用旧密钥编译的客户端将无法再连接。
- 将 CLIENT 块粘贴到 HDKOCryptKeys.cpp。
- 将 SERVER 块粘贴到 Server/core/crypto/HDKOCryptServerKeys.h。输出中写的是 "shared/..." 路径,但该路径已过时。
- 删除 keys.txt。
5. 编译服务器
按您的机器修改 Server/build.bat 中的两行:
然后编译:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<您的用户名>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- 依次执行:审计检查、cmake configure(首次较慢)、8 个并行任务编译、安装到 Server/release 文件夹。
- 最后一行为 BUILD_ALL_OK 即表示编译成功。
- 如果编译在没有错误信息的情况下中断,说明内存不足:执行 set HDKO_BUILD_JOBS=4 并关闭 Unreal 编辑器。
6. 服务器配置
Start.bat 使用 config\local.json。该文件不在 git 中,需要自己创建:
- 将 development.json 复制为 local.json。
- 修改下列值。
- admin.bindAddress 保持 127.0.0.1。切勿对外开放 9130 端口。
- 将文件复制到 Server/release/config,或重新运行 build.bat。
local.json 中需要修改的值:- crypto.enabled → true
- login.net.transport 和 game.net.transport → "WS"
- login.net.bindAddress 和 game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp 和 serverIp → "192.168.1.100"(发送给客户端的游戏服务器地址)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
密码写在环境变量中,而不是 JSON 中:- HDKO_PG_PASSWORD → 数据库密码。Start.bat 会自行设为 hdko2026;如果您的密码不同,请修改该行。
- HDKO_ADMIN_TOKEN → Admin API 和 dashboard
- HDKO_OPENROUTER_KEY → 机器人聊天,可选
7. 启动服务器
登录服务器(端口 15100)和游戏服务器(端口 15572)会在两个独立的控制台中打开。Kod:cd Server\release scripts\Start.bat
检查清单:打包版本:
- 控制台中不应出现 "error" 行。
- curl localhost:9130/health 应有响应。
- 如果客户端在另一台电脑上,防火墙必须允许 TCP 15100 和 15572 入站连接。
Dashboard(可选):- 修改 dashboard.bat 中的 DASH 路径。
- 将 .env.example 复制为 .env。
- 运行 dashboard.bat 并打开 http://localhost:4000。第一个登录的用户成为 owner。
8. 客户端设置- Source/HDKO/Defs/HDKOBuildConfig.h:HDKO_OFFICIAL_SERVERS 必须为 0。设为 1 时客户端会连接官方 KO 服务器。
- Source/HDKO/Security/HDKONetSecrets.h:在 HDKO_DEFAULT_LOGIN_HOST 行填入服务器 IP("192.168.1.100"),端口保持 15100。
- 在编辑器中 HDKO_DEV_LOCAL = 1。所有打包版本中为 0,客户端会连接生产服务器(wss://login.hd-ko.com:2053)。
- 若要让打包版本连接局域网服务器,请取消文件开头 //#define HDKO_DEV_LOCAL 1 这一行的注释。发布前请改回。
- 游戏服务器的 IP 和端口不写在客户端中,而是来自登录服务器的服务器列表。
- HDKOCryptKeys.cpp:必须包含与服务器 seed 匹配的密钥(第 4 步)。
9. 编译并运行客户端- 右键点击 HDKO.uproject,选择 "Generate Visual Studio project files"。
- 打开 HDKO.sln,选择 Development Editor | Win64 并编译。也可以双击 uproject 并选择 "Yes"。
- 编辑器会打开 IntroScreen 地图。首次启动时着色器编译耗时较长。
- 点击 Play,用新的 ID 和密码登录(账号自动创建),选择服务器,创建角色。
仓库中的 run.bat 仍指向 UE_5.7;使用前请改为 UE_5.8。Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<您的用户名>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. 示例:一台电脑作服务器,另一台作客户端
服务器电脑(192.168.1.100):单台电脑同样适用;所有 IP 均使用 127.0.0.1。
- 安装 PostgreSQL + ODBC,恢复 05.10.2026-clean.sql 备份。
- 放好服务器密钥。
- 修改 build.bat 中的路径,编译直到出现 BUILD_ALL_OK。
- 创建 local.json(WS、开启加密、0.0.0.0、serverIp=192.168.1.100)。
- 在防火墙中开放 15100 和 15572 端口。
- 运行 Start.bat。
客户端电脑:- 安装 UE 5.8 + VS,使用 LFS 克隆仓库。
- 设置 HDKO_OFFICIAL_SERVERS 0 和 LOGIN_HOST="192.168.1.100";密钥必须与服务器匹配。
- 编译 Development Editor,点击 Play。
11. 常见问题
- 连接后立即断开 → 加密密钥不匹配,或服务器设置为 crypto=false / TCP。
- 登录正常,进入服务器时卡住 → serverIp / gamePort 错误,或 15572 端口未开放。
- 服务器启动时因 ODBC 错误退出 → 未安装驱动,或驱动名称与配置中的不一致。
- 服务器启动时提示 "password authentication failed" → HDKO_PG_PASSWORD 未设置或错误。
- pg_restore 报版本错误 → pg_restore 版本低于 18。
- 出现数千条 "Cannot open include" 错误 → 未加载 VS 环境。不要使用旧的 build_target.bat。
- .uasset 文件只有几百字节,项目无法打开 → 克隆时未安装 LFS。运行 git lfs install 和 git lfs pull
法律声明与免责声明 (Disclaimer)
本项目为非营利性质的粉丝自制 (fan-made) 作品,仅供技术学习、实践交流及作品集展示使用。
- 知识产权: 原版游戏涉及的所有概念、角色、美术图像、音效、音乐及注册商标均归原版权方所有。本项目对上述任何元素均不主张任何权利或所有权。
- 使用目的: 本代码仓库 (Repository) 及其包含的源码仅用于展示软件架构、游戏机制和编程实践。本项目不存在任何直接或间接的商业盈利行为。
- 下架要求: 若版权方或权利持有人对此项目有任何异议或下架诉求,一经收到通知,本项目及所有相关源码将立即下架并删除。
Uluslarası meraklı arkadaşlarada destek olsun derken haklısınız baya uzamışAşağı İn İn Bitmedi Bu Nedir Arkadaş![]()
muazzam iş hocam. emeğinize sağlık!Merhaba arkadaşlar,
Unreal Engine 5.8 ile geliştirdiğimiz ve detaylarına aşağıdaki bağlantıdan ulaşabileceğiniz projemizi tamamlamış bulunuyoruz. İsteyen herkes, hem sunucu (server) hem de istemci (client) tarafını kendi ihtiyaçlarına göre dilediği gibi düzenleyebilir. Proje bünyesinde onlarca editör, importer ve exporter ile özellikle yeni başlayan geliştiricilere büyük fayda sağlayacağını düşünüyorum. Projeyi dilerseniz mobil platformlar için, dilerseniz Windows/Mac/Linux ortamında derleyip çalıştırabilirsiniz.
Çalışma süreci:Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
Sıfırdan yeniden geliştirilen istemci ve bu istemciyle tam uyumlu olacak biçimde platformlar arası (cross-platform) mimariyle baştan yazılmış bir sunucu. Veritabanı altyapısı, cross-platform uyumluluğunu sağlamak amacıyla PostgreSQL kullanıldı. Geriye dönük olarak 24xx sunucularla da uyumlu çalışacak şekilde tasarlanmıştır; istemci bu sunuculara sorunsuz bağlanabilir, hatta doğrudan orijinal U*KO sunucusuna giriş yapabilirsiniz. Kısacası sunucuyu ister Windows ister Linux işletim sistemlerinde rahatlıkla çalıştırabilirsiniz.
Tüm görsel/işitsel materyaller (asset) ve binlerce dokümantasyon dahil Git deposu bağlantısı aşağıdadır (yaklaşık 30 GB). U*KO ve KO*EKO'ya ait tüm etkinlikler (events) ve eşyalar (items) projede eksiksiz yer almaktadır.
1.9 GB kod ve dökümantasyon 30 GB Asset mevcut. İsterseniz sadece kod çekerek asseti daha sonra kendinizde tamamlayabilirsiniz.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
Yıllardır severek oynadığımız oyuna bir nebze de olsa güncelleme ve modern endüstri standardı kazandırmak istedik. Projede mevcut özellikleriyle, grafik, socket sistemi, paket kripto seviyesi modernize edildi muhtemelen bir çok ücretli versiyonda bulamayacağınız standarta getirildi. Sunucu tarafındaki tüm kodlar, görev sistemleri (quests) dahil olmak üzere 5.000'den fazla test ile denetlenmiştir; tüm Lua dosyaları tek tek incelenmiştir. %90 herşey dökümante edilmiş durumda.
Dilediğiniz gibi geliştirip genişletmeniz ve optimize etmeniz dileğiyle.
Deneyenlerden ve geliştirenlerden birer görsel alırız
Ekli dosyayı görüntüle 23596
Ekli dosyayı görüntüle 23630
Ekli dosyayı görüntüle 23631
HDKO Derleme ve Çalıştırma Kılavuzu (Sunucu + Client)
Önce bilinmesi gereken üç şey:
- Depoyla gelen development.json ile client bağlanamaz. O dosyada TCP var ve kripto kapalı. Client ise her zaman WebSocket ve HDKOCrypt kullanıyor. Bu yüzden local.json dosyasını elle oluşturmanız gerekiyor (6. adım).
- Yedekler .sql uzantılı ama düz SQL değil. pg_dump custom formatındalar ve PostgreSQL 18.4 ile alınmışlar. psql -f ile açılmazlar, pg_restore 18 gerekir.
- Sunucu kripto anahtarı depoda yok. Anahtar dosyası elinizde yoksa yeni bir çift üretip iki tarafa da yapıştırmanız gerekir.
1. Ön gereksinimler
Her iki taraf için:
- Windows 10/11 x64
HDKO Derleme ve Çalıştırma Kılavuzu (Sunucu + Client)
Önce bilinmesi gereken üç şey:
- Depoyla gelen development.json ile client bağlanamaz. O dosyada TCP var ve kripto kapalı. ClienHDKOCrypt kullanıyor. Bu yüzden local.json dosyasını elle oluşturmanız gerekiyor (6. adım).
- Yedekler .sql uzantılı ama düz SQL değil. pg_dump custom formatındalar ve PostgreSQL 18.4 ile alınmışlar. psql -f ile açılmazlar, pg_restore 18 gerekir.
- Sunucu kripto anahtarı depoda yok. Anahtar dosyası elinizde yoksa yeni bir çift üretip iki tarafa da yapıştırmanız gerekir.
1. Ön gereksinimler
Her iki taraf için:
- Windows 10/11 x64
- Git ve Git LFS. Content klasörü LFS'te. LFS kurulu değilken klonlarsanız .uasset dosyaları yalnızca işaretçi olarak iner ve proje açılmaz.
- Visual Studio 2022 (17.8+) veya VS 2026
- İş yükleri: "Desktop development with C++" ve "Game development with C++"
- Bileşenler: MSVC x64, Windows SDK, "C++ CMake tools" (CMake ve Ninja buradan gelir), .NET
- Python 3.10+, PATH'te olmalı. build.bat derlemeden önce audit scriptleri çalıştırıyor; Python yoksa build başarısız olur.
Sadece sunucu için:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg, ardından bootstrap-vcpkg.bat. Bağımlılıkları ilk derlemede kendisi kurar.- PostgreSQL 18
- psqlODBC x64: ODBC sürücü listesinde adı tam olarak "PostgreSQL Unicode(x64)" görünmeli.
- Node.js 20+: isteğe bağlı, yalnızca dashboard için.
Sadece client için:
- Unreal Engine 5.8
- 300 GB'tan fazla boş disk
- DX12 / SM6 destekli ekran kartı
2. Kaynağı indirme
Örneklerde sunucunun LAN IP'si 192.168.1.100 olarak geçiyor; her yerde kendi IP'nizi yazın.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. Veritabanı
- PostgreSQL 18'i kurun. postgres kullanıcısına bir şifre verin (örnek: hdko2026), port 5432 kalsın.
- psqlODBC x64'ü kurun.
- Veritabanını oluşturup yedeği geri yükleyin:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
Üç yedek dosyası var:
- 05.10.2026-clean.sql: 237 canlı tablo. Bunu kullanın.
- 2026-10-05-dropped.sql: 285 ölü tablo.
- 05.10.2026.sql: ikisinin toplamı, 522 tablo.
Yedekler 05.10.2026 tarihli. Sunucu "eksik tablo/kolon" diyerek açılmazsa sonradan eklenmiş bir migrationsql/README.md dosyasına bakın.
Oyun hesabı: AUTO_REGISTER varsayılan olarak açık. İlk girişte yazdığınız ID ve şifreyle hesap otomatik açılır.
4. Kripto anahtarları (iki tarafta eşleşmeli)
- Client tarafı: Source/HDKO/Security/HDKOCryptKeys.cpp. Git'te duruyor; sabitlenmiş public key burada.
- Sunucu tarafı: Server/core/crypto/HDKOCryptServerKeys.h. Git'te yok, gizli seed burada. Şablonu .example dosyası; içi sıfırlarla dolu olduğu için hiçbir bağlantıyı kabul etmez.
Elinizde sunucu anahtar dosyası (HDKOCryptServerKeys.h) varsa onu kopyalamanız yeterli. Yoksa yeni bir çift üretin:
- "x64 Native Tools Command Prompt" içinde çalıştırın:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txtYeni anahtar üretirseniz eski anahtarla derlenmiş client'lar artık bağlanamaz.
- CLIENT bloğunu HDKOCryptKeys.cpp dosyasına yapıştırın.
- SERVER bloğunu Server/core/crypto/HDKOCryptServerKeys.h dosyasına yapıştırın. Çıktıda "shared/..." yolu yazıyor ama o yol eski.
- keys.txt dosyasını silin.
5. Sunucuyu derleme
Server/build.bat içindeki iki satırı kendi makinenize göre düzeltin:
Sonra derleyin:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<siz>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- Sırasıyla audit kontrolleri, cmake configure (ilk sefer uzun sürer), 8 paralel işle derleme ve Server/release klasörüne kurulum yapar.
- Son satır BUILD_ALL_OK ise derleme başarılıdır.
- Derleme hata mesajı vermeden kesilirse bellek yetmemiştir: set HDKO_BUILD_JOBS=4 yapıp Unreal editörünü kapatın.
6. Sunucu config'i
Start.bat, config\local.json dosyasını kullanıyor. Bu dosya git'te yok, kendiniz oluşturacaksınız:
- development.json dosyasını local.json adıyla kopyalayın.
- Aşağıdaki değerleri değiştirin.
- admin.bindAddress değeri 127.0.0.1 olarak kalsın. 9130 portunu asla dışarı açmayın.
- Dosyayı Server/release/config klasörüne kopyalayın ya da build.bat'i tekrar çalıştırın.
local.json içinde değiştirilecek değerler:
- crypto.enabled → true
- login.net.transport ve game.net.transport → "WS"
- login.net.bindAddress ve game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp ve serverIp → "192.168.1.100" (client'a bildirilen oyun sunucusu adresi)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
Şifreler JSON'a değil, ortam değişkenlerine yazılır:
- HDKO_PG_PASSWORD → Veritabanı şifresi. Start.bat bunu hdko2026 olarak kendisi set ediyor; şifreniz farklıysa o satırı düzeltin.
- HDKO_ADMIN_TOKEN → Admin API ve dashboard
- HDKO_OPENROUTER_KEY → Bot sohbeti, isteğe bağlı
7. Sunucuyu başlatma
Login sunucusu 15100, game sunucusu 15572 portunda iki ayrı konsolda açılır.Kod:cd Server\release scripts\Start.bat
Kontrol listesi:
- Konsollarda "error" satırı olmamalı.
- curl localhost:9130/health cevap vermeli.
- Client başka bir PC'deyse güvenlik duvarında TCP 15100 ve 15572 gelen bağlantılara açık olmalı.
Dashboard (isteğe bağlı):
- dashboard.bat içindeki DASH yolunu düzeltin.
- .env.example dosyasını .env olarak kopyalayın.
- dashboard.bat'i çalıştırıp
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.adresini açın. İlk giren kullanıcı owner olur.
8. Client ayarları
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS 0 olmalı. 1 olursa resmi KO sunucusun
- Source/HDKO/Security/HDKONetSecrets.h:HDKO_DEFAULT_LOGIN_HOST satırına sunucu IP'sini yazın ("192.168.1.100"), port 15100 kalsın.
- Editörde HDKO_DEV_LOCAL = 1 olur. Paketlenmiş build'lerin hepsinde 0 olur ve client production'a (wss://login.hd-ko.com:2053) gider.
- Paket build'in LAN sunucusuna gitmesi için dosyanın başındaki //#define HDKO_DEV_LOCAL 1 satırının yorumunu kaldırın. Release öncesi geri alın.
- Oyun sunucusunun IP'si ve portu client'ta yazmıyor; login sunucusunun server listesinden gelir.
- HDKOCryptKeys.cpp: sunucunun seed'iyle eşleşen anahtar burada olmalı (4. adım).
9. Client'ı derleme ve çalıştırma
- HDKO.uproject dosyasına sağ tıklayıp "Generate Visual Studio project files" seçin.
- HDKO.sln'yi açın, Development Editor | Win64 seçip derleyin. Alternatif olarak uproject'e çift
- Editör IntroScreen haritasıyla açılır. İlk açılışta shader derlemesi uzun sürer.
- Play'e basın, yeni bir ID ve şifreyle girin (hesap otomatik açılır), sunucuyu seçin, karakter oluşturun.
Paket build almak için:
Depodaki run.bat hâlâ UE_5.7 yolunu gösteriyor; kullanmadan önce UE_5.8 yapın.Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<siz>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. Örnek senaryo: biri sunucu, biri client iki PC
Sunucu PC (192.168.1.100):
- PostgreSQL + ODBC kurup 05.10.2026-clean.sql yedeğini geri yükleyin.
- Sunucu anahtarını yerine koyun.
- build.bat yollarını düzeltip BUILD_ALL_OK görene kadar derleyin.
- local.json'u oluşturun (WS, kripto açık, 0.0.0.0, serverIp=192.168.1.100).
- Güvenlik duvarında 15100 ve 15572 portlarını açın.
- Start.bat'i çalıştırın.
Client PC:
- UE 5.8 + VS kurun, depoyu LFS ile klonlayın.
- HDKO_OFFICIAL_SERVERS 0, LOGIN_HOST="192.168.1.100" ayarlayın; anahtar sunucuyla eşleşsin.
- Development Editor ile derleyin, Play'e basın.
Tek PC'de de aynı adımlar geçerli; IP olarak her yerde 127.0.0.1 kullanın.
11. Sık karşılaşılan sorunlar
- Bağlanıyor, hemen kopuyor → Kripto anahtarları uyuşmuyor ya da sunucuda crypto=false / TCP ayar
- Login çalışıyor, sunucuya girişte takılıyor → serverIp / gamePort yanlış veya 15572 portu kapalı.
- Sunucu açılışta ODBC hatasıyla kapanıyor → Sürücü kurulu değil ya da adı config'teki adla aynı
- Sunucu açılışta "password authentication failed" diyor → HDKO_PG_PASSWORD set edilmemiş veya yanlış.
- pg_restore sürüm hatası veriyor → pg_restore sürümü 18'den eski.
- Binlerce "Cannot open include" hatası → VS ortamı yüklenmemiş. Eski build_target.bat'i kullanmayın.
- .uasset dosyaları birkaç yüz bayt, proje açılmıyor → LFS kurulmadan klonlanmış. git lfs install ve git lfs pull çalıştırın.
Yasal Uyarı ve Hak Bildirimi (Disclaimer)
Bu proje; eğitim, pratik ve portföy geliştirme amacıyla hazırlanmış, kâr amacı gütmeyen, hayran yapımı (fan-made) bir çalışmadır._______
- Fikri Mülkiyet: Oyuna ait tüm konsept, karakterler, görseller, ses efektleri, müzikler ve ticari markalar orijinal hak sahibine aittir. Bu unsurlar üzerinde hiçbir hak veya mülkiyet iddia edilmemektedir.
- Kullanım Amacı: Bu depo (repository) ve içindeki kaynak kodları yalnızca yazılım mimarisi, oyun mekanikleri ve programlama pratiklerini sergilemek üzere paylaşılmıştır. Projeden doğrudan veya dolaylı hiçbir maddi kazanç/gelir elde edilmemektedir.
- Kaldırma Talebi: Telif veya hak sahiplerinin projeyle ilgili herhangi bir itirazı ya da talebi olması halinde, bildirim yapıldığı anda proje ve tüm kaynak kodları derhal yayından kaldırılacaktır.
Hello everyone,
We have completed the hobby development of our project built in Unreal Engine 5.8, with details provided in the link below. Anyone is free to customize and modify both the server and client sides completely to their needs. I believe this will be very useful for beginners, as dozens of editors, importers, and exporters are included in the project. Feel free to build and run it on mobile or Mac.
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
A client rebuilt from scratch and a server built from the ground up for cross-platform compatibility, fully matched with the client. The database was implemented using PostgreSQL for cross-platform support. It can also be used backward-compatibly with 24xx servers; the client connects without issues. In fact, you can even log into official U*KO using this client. In short, you can run the server on either Windows or Linux.
Git repository link including all assets and thousands of documents (the project size is around ~30 GB). All events and items from UKO / KOEKO are included in the project.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
It would be wonderful to bring modern industry standards and a fresh update to the game we have played for years. For this reason, all server-side code is verified with 5,000+ tests, including quests. Every single Lua file has been inspected individually. Wishing you all the best in developing it as you wish.- HDKO Build and Run Guide (Server + Client)
Three things to know first:
- The client cannot connect with the development.json that ships in the repo. That file uses TCP with crypto off, while the client always speaks WebSocket + HDKOCrypt. You have to create local.json by hand (step 6).
- The backups have a .sql extension but are not plain SQL. They are pg_dump custom-format archives made with PostgreSQL 18.4. psql -f cannot read them; you need pg_restore 18.
- The server crypto key is not in the repo. If you do not have the key file, generate a new pair and paste it into both ends.
1. Prerequisites
Both sides:
- Windows 10/11 x64
- Git and Git LFS. The Content folder is stored in LFS. If you clone without LFS installed, the .uasset files arrive as pointers only and the project will not open.
- Visual Studio 2022 (17.8+) or VS 2026
- Workloads: "Desktop development with C++" and "Game development with C++"
- Components: MSVC x64, Windows SDK, "C++ CMake tools" (provides CMake and Ninja), .NET
- Python 3.10+ on PATH. build.bat runs audit scripts before compiling; without Python the build fails.
Server only:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg, then bootstrap-vcpkg.bat. It installs the dependencies by itself on the first build.- PostgreSQL 18
- psqlODBC x64: the ODBC driver list must show the name exactly as "PostgreSQL Unicode(x64)".
- Node.js 20+: optional, dashboard only.
Client only:
- Unreal Engine 5.8
- 300 GB+ free disk
- DX12 / SM6 capable GPU
2. Get the source
The examples use 192.168.1.100 as the server's LAN IP; substitute your own everywhere.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. Database
- Install PostgreSQL 18. Give the postgres user a password (example: hdko2026) and keep port 5432.
- Install psqlODBC x64.
- Create the database and restore the backup:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
There are three backup files:
- 05.10.2026-clean.sql: 237 live tables. Use this one.
- 2026-10-05-dropped.sql: 285 dead tables.
- 05.10.2026.sql: both together, 522 tables.
The backups are dated 05.10.2026. If the server refuses to start with "missing table/column", a later migration is missing; see Server/docs/sql/README.md.
Game account: AUTO_REGISTER is on by default. On the first login the account is created with the ID and password you type.
4. Crypto keys (must match on both ends)
- Client side: Source/HDKO/Security/HDKOCryptKeys.cpp. Tracked in git; holds the pinned public key.
- Server side: Server/core/crypto/HDKOCryptServerKeys.h. Not in git; holds the secret seed. Its template is the .example file, which is all zeros and therefore accepts no connections.
If you have the server key file (HDKOCryptServerKeys.h), just copy it in. Otherwise generate a new pair:
- Run inside an "x64 Native Tools Command Prompt":
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txtIf you generate a new key, clients built with the old key can no longer connect.
- Paste the CLIENT block into HDKOCryptKeys.cpp.
- Paste the SERVER block into Server/core/crypto/HDKOCryptServerKeys.h. The output mentions a "shared/..." path, but that path is out of date.
- Delete keys.txt.
5. Build the server
Fix these two lines in Server/build.bat for your machine:
Then build:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<you>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- In order: audit checks, cmake configure (slow the first time), build with 8 parallel jobs, install into the Server/release folder.
- The build succeeded if the last line is BUILD_ALL_OK.
- If the build stops without an error message, memory ran out: set HDKO_BUILD_JOBS=4 and close the Unreal editor.
6. Server config
Start.bat uses config\local.json. That file is not in git, so you create it:
- Copy development.json as local.json.
- Change the values below.
- Keep admin.bindAddress at 127.0.0.1. Never expose port 9130.
- Copy the file into Server/release/config, or run build.bat again.
Values to change in local.json:
- crypto.enabled → true
- login.net.transport and game.net.transport → "WS"
- login.net.bindAddress and game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp and serverIp → "192.168.1.100" (the game server address sent to the client)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
Passwords go in environment variables, not in the JSON:
- HDKO_PG_PASSWORD → Database password. Start.bat sets it to hdko2026 itself; fix that line if your password differs.
- HDKO_ADMIN_TOKEN → Admin API and dashboard
- HDKO_OPENROUTER_KEY → Bot chat, optional
7. Start the server
The login server (port 15100) and the game server (port 15572) open in two separate consoles.Kod:cd Server\release scripts\Start.bat
Checklist:
- No "error" lines in the consoles.
- curl localhost:9130/health should answer.
- If the client is on another PC, the firewall must allow incoming TCP 15100 and 15572.
Dashboard (optional):
- Fix the DASH path in dashboard.bat.
- Copy .env.example as .env.
- Run dashboard.bat and open
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.. The first user to sign in becomes the owner.
8. Client settings
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS must be 0. With 1 the client connects to the official KO server.
- Source/HDKO/Security/HDKONetSecrets.h:put the server IP on the HDKO_DEFAULT_LOGIN_HOST line ("192.168.1.100") and keep port 15100.
- In the editor HDKO_DEV_LOCAL = 1. In every packaged build it is 0 and the client goes to production (wss://login.hd-ko.com:2053).
- To make a packaged build go to the LAN server, uncomment the //#define HDKO_DEV_LOCAL 1 line near the top of the file. Revert it before a release.
- The game server's IP and port are not in the client; they come from the login server's server list.
- HDKOCryptKeys.cpp: must hold the key that matches the server's seed (step 4).
9. Build and run the client
- Right-click HDKO.uproject and choose "Generate Visual Studio project files".
- Open HDKO.sln, select Development Editor | Win64 and build. Alternatively, double-click the uproject and answer "Yes".
- The editor opens with the IntroScreen map. The first launch spends a long time compiling shaders.
- Press Play, log in with a new ID and password (the account is created automatically), pick the server, create a character.
To make a packaged build:
The run.bat in the repo still points at UE_5.7; change it to UE_5.8 before using it.Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<you>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. Example: one PC as server, one PC as client
Server PC (192.168.1.100):
- Install PostgreSQL + ODBC and restore the 05.10.2026-clean.sql backup.
- Put the server key in place.
- Fix the build.bat paths and build until you see BUILD_ALL_OK.
- Create local.json (WS, crypto on, 0.0.0.0, serverIp=192.168.1.100).
- Open ports 15100 and 15572 in the firewall.
- Run Start.bat.
Client PC:
- Install UE 5.8 + VS, clone the repo with LFS.
- Set HDKO_OFFICIAL_SERVERS 0 and LOGIN_HOST="192.168.1.100"; the key must match the server.
- Build Development Editor and press Play.
The same steps work on a single PC; use 127.0.0.1 as the IP everywhere.
11. Common problems
- Connects, then drops immediately → The crypto keys do not match, or the server is set to crypto=false / TCP.
- Login works, entering the server hangs → serverIp / gamePort is wrong or port 15572 is closed.
- Server exits at startup with an ODBC error → The driver is not installed, or its name differs from the one in the config.
- Server exits at startup with "password authentication failed" → HDKO_PG_PASSWORD is not set or is wrong.
- pg_restore reports a version error → pg_restore is older than 18.
- Thousands of "Cannot open include" errors → The VS environment is not loaded. Do not use the old build_target.bat.
- .uasset files are a few hundred bytes, the project will not open → Cloned without LFS. Run git lfs install and git lfs pull.
Legal Notice and Disclaimer
This project is a non-profit, fan-made work created solely for educational, practice, and portfolio development purposes.안녕하세요 여러분,
- Intellectual Property: All concepts, characters, graphics, sound effects, music, and trademarks belonging to the original game are the property of the original rights holder. No rights or ownership are claimed over any of these elements.
- Intended Use: This repository and the source code within are shared exclusively to showcase software architecture, game mechanics, and programming practices. No direct or indirect financial gain or revenue is generated from this project.
- Takedown Request: If copyright or rights holders have any objections or requests regarding this project, the project and all related source code will be removed immediately upon notification.
- __________
취미로 진행해 오던 Unreal Engine 5.8 기반 프로젝트의 개발을 완료하여 공유합니다. 자세한 내용은 아래 링크에서 확인하실 수 있습니다. 누구나 필요에 맞게 서버와 클라이언트 양쪽 모두를 자유롭게 수정하고 커스텀할 수 있습니다. 수십 종의 에디터, 임포터(Importer), 익스포터(Exporter) 도구가 프로젝트에 포함되어 있어 입문자분들께 큰 도움이 될 것입니다. 모바일 환경이나 Mac 컴퓨터 어디서든 자유롭게 빌드하여 사용하실 수 있습니다.
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
처음부터 새로 제작된 클라이언트와 이에 완벽히 호환되도록 크로스 플랫폼용으로 바닥부터 개발된 서버입니다. 데이터베이스는 크로스 플랫폼 지원을 위해 PostgreSQL로 구축되었습니다. 이전 24xx 서버와도 호환되어 문제없이 접속 가능하며, 심지어 이 클라이언트로 오리지널 U*KO에 로그인할 수도 있습니다. 즉, Windows와 Linux 어디서나 서버를 원활하게 구동할 수 있습니다.
모든 에셋과 수천 개의 문서가 포함된 Git 링크입니다 (프로젝트 용량은 약 30GB 규모입니다). UKO / KOEKO의 모든 이벤트와 아이템이 프로젝트 내에 구현되어 있습니다.
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
오랜 기간 함께 즐겨온 게임에 조금이나마 현대적인 업계 표준과 업데이트를 더하고자, 퀘스트를 포함한 서버 측 모든 코드는 5,000개 이상의 테스트를 거쳤습니다. 모든 Lua 스크립트 파일 역시 하나하나 면밀히 검수되었습니다. 원하시는 방향대로 멋지게 발전시켜 나가시길 바랍니다.
- HDKO 빌드 및 실행 가이드 (서버 + 클라이언트)
먼저 알아야 할 세 가지:
- 저장소에 포함된 development.json으로는 클라이언트가 접속할 수 없습니다. 이 파일은 TCP를 사용하 언트는 항상 WebSocket + HDKOCrypt를 사용합니다. 따라서 local.json을 직접 만들어야 합니다(6단계).
- 백업 파일은 .sql 확장자지만 일반 SQL이 아닙니다. PostgreSQL 18.4로 만든 pg_dump 커스텀 형식 아 없으며 pg_restore 18이 필요합니다.
- 서버 암호화 키는 저장소에 없습니다. 키 파일이 없다면 새 키 쌍을 생성해 양쪽에 붙여 넣어야 합니다.
1. 사전 요구 사항
양쪽 공통:
- Windows 10/11 x64
- Git 및 Git LFS. Content 폴더는 LFS에 저장되어 있습니다. LFS를 설치하지 않은 상태로 클론하면 .uasset 파일이 포인터로만 받아져 프로젝트가 열리지 않습니다.
- Visual Studio 2022 (17.8+) 또는 VS 2026
- 워크로드: "Desktop development with C++" 및 "Game development with C++"
- 구성 요소: MSVC x64, Windows SDK, "C++ CMake tools"(CMake와 Ninja 포함), .NET
- Python 3.10+, PATH에 등록. build.bat은 컴파일 전에 감사(audit) 스크립트를 실행하므로 Python이 없으면 빌드가 실패합니다.
서버 전용:
- vcpkg: git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg 후 bootstrap-vcpkg.bat 실행. 첫 빌드 때 의존성을 자동으로 설치합니다.- PostgreSQL 18
- psqlODBC x64: ODBC 드라이버 목록에 이름이 정확히 "PostgreSQL Unicode(x64)"로 표시되어야 합니다.
- Node.js 20+: 선택 사항, 대시보드 전용.
클라이언트 전용:
- Unreal Engine 5.8
- 300 GB 이상의 여유 디스크 공간
- DX12 / SM6 지원 그래픽카드
2. 소스 받기
예시에서는 서버의 LAN IP를 192.168.1.100으로 사용합니다. 모든 곳에서 본인의 IP로 바꾸십시오.Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. 데이터베이스
- PostgreSQL 18을 설치합니다. postgres 사용자에 비밀번호를 지정하고(예: hdko2026) 포트는 5432로 둡니다.
- psqlODBC x64를 설치합니다.
- 데이터베이스를 만들고 백업을 복원합니다:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql
백업 파일은 세 개입니다:
- 05.10.2026-clean.sql: 사용 중인 테이블 237개. 이 파일을 사용하십시오.
- 2026-10-05-dropped.sql: 폐기된 테이블 285개.
- 05.10.2026.sql: 두 파일의 합계, 테이블 522개.
백업 날짜는 2026.10.05입니다. 서버가 "테이블/컬럼 없음"으로 시작되지 않으면 이후에 추가된 migration이 빠진 것입니다. Server/docs/sql/README.md를 참고하십시오.
게임 계정: AUTO_REGISTER가 기본으로 켜져 있습니다. 처음 로그인할 때 입력한 ID와 비밀번호로 계정이 자동 생성됩니다.
4. 암호화 키 (양쪽이 일치해야 함)
- 클라이언트 측: Source/HDKO/Security/HDKOCryptKeys.cpp. git에 포함되어 있으며 고정된 공개 키가 들어 있습니다.
- 서버 측: Server/core/crypto/HDKOCryptServerKeys.h. git에 없으며 비밀 seed가 들어 있습니다. 템플릿은 .example 파일인데, 전부 0으로 채워져 있어 어떤 연결도 받지 않습니다.
서버 키 파일(HDKOCryptServerKeys.h)이 있다면 복사하기만 하면 됩니다. 없다면 새 키 쌍을 생성하십시오:
- "x64 Native Tools Command Prompt"에서 실행합니다:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txt새 키를 생성하면 이전 키로 빌드된 클라이언트는 더 이상 접속할 수 없습니다.
- CLIENT 블록을 HDKOCryptKeys.cpp에 붙여 넣습니다.
- SERVER 블록을 Server/core/crypto/HDKOCryptServerKeys.h에 붙여 넣습니다. 출력에는 "shared/..." 경로가 적혀 있지만 오래된 경로입니다.
- keys.txt를 삭제합니다.
5. 서버 빌드
Server/build.bat의 두 줄을 본인 환경에 맞게 수정합니다:
그다음 빌드합니다:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<사용자명>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- 순서: 감사 검사, cmake configure(첫 실행은 오래 걸림), 8개 병렬 작업으로 빌드, Server/release 폴더에 설치.
- 마지막 줄이 BUILD_ALL_OK이면 빌드 성공입니다.
/LIST]
6. 서버 설정
Start.bat은 config\local.json을 사용합니다. 이 파일은 git에 없으므로 직접 만들어야 합니다:
- development.json을 local.json이라는 이름으로 복사합니다.
- 아래 값들을 변경합니다.
- admin.bindAddress는 127.0.0.1로 둡니다. 9130 포트는 절대 외부에 열지 마십시오.
- 파일을 Server/release/config에 복사하거나 build.bat을 다시 실행합니다.
local.json에서 변경할 값:
- crypto.enabled → true
- login.net.transport 및 game.net.transport → "WS"
- login.net.bindAddress 및 game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp 및 serverIp → "192.168.1.100" (클라이언트에 전달되는 게임 서버 주소)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
비밀번호는 JSON이 아니라 환경 변수에 넣습니다:
- HDKO_PG_PASSWORD → 데이터베이스 비밀번호. Start.bat이 직접 hdko2026으로 설정합니다. 비밀번호가 다르면 해당 줄을 수정하십시오.
- HDKO_ADMIN_TOKEN → Admin API 및 대시보드
- HDKO_OPENROUTER_KEY → 봇 채팅, 선택 사항
7. 서버 시작
로그인 서버(포트 15100)와 게임 서버(포트 15572)가 각각 별도의 콘솔 창에서 실행됩니다.Kod:cd Server\release scripts\Start.bat
확인 목록:
- 콘솔에 "error" 줄이 없어야 합니다.
- curl localhost:9130/health 가 응답해야 합니다.
- 클라이언트가 다른 PC에 있다면 방화벽에서 TCP 15100 및 15572 인바운드 연결을 허용해야 합니다.
대시보드 (선택 사항):
- dashboard.bat의 DASH 경로를 수정합니다.
- .env.example을 .env로 복사합니다.
- dashboard.bat을 실행하고
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.을 엽니다. 처음 로그인한 사용자가 owner가 됩니다.
8. 클라이언트 설정[/CODE]
- Source/HDKO/Defs/HDKOBuildConfig.h: HDKO_OFFICIAL_SERVERS는 0이어야 합니다. 1이면 클라이언트가 공식 KO 서버에 접속합니다.
- Source/HDKO/Security/HDKONetSecrets.h:HDKO_DEFAULT_LOGIN_HOST 줄에 서버 IP("192.168.1.100")를 넣고 포트는 15100으로 둡니다.
- 에디터에서는 HDKO_DEV_LOCAL = 1입니다. 모든 패키지 빌드에서는 0이며 클라이언트가 프로덕션(wss://login.hd-ko.com:2053)으로 접속합니다.
- 패키지 빌드가 LAN 서버로 접속하게 하려면 파일 상단의 //#define HDKO_DEV_LOCAL 1 줄의 주석을 해제하십시오. 릴리스 전에 되돌려야 합니다.
- 게임 서버의 IP와 포트는 클라이언트에 적혀 있지 않으며 로그인 서버의 서버 목록에서 전달됩니다.
- HDKOCryptKeys.cpp: 서버의 seed와 일치하는 키가 들어 있어야 합니다(4단계).
저장소의 run.bat은 아직 UE_5.7 경로를 가리킵니다. 사용 전에 UE_5.8로 바꾸십시오.
10. 예시: 서버 PC 한 대, 클라이언트 PC 한 대
서버 PC (192.168.1.100):
- PostgreSQL + ODBC를 설치하고 05.10.2026-clean.sql 백업을 복원합니다.
- 서버 키를 제자리에 둡니다.
- build.bat 경로를 수정하고 BUILD_ALL_OK가 나올 때까지 빌드합니다.
- local.json을 만듭니다(WS, 암호화 켬, 0.0.0.0, serverIp=192.168.1.100).
- 방화벽에서 15100 및 15572 포트를 엽니다.
- Start.bat을 실행합니다.
클라이언트 PC:
- UE 5.8 + VS를 설치하고 LFS로 저장소를 클론합니다.
- HDKO_OFFICIAL_SERVERS 0, LOGIN_HOST="192.168.1.100"으로 설정합니다. 키가 서버와 일치해야 합니다.
- Development Editor로 빌드하고 Play를 누릅니다.
PC 한 대에서도 같은 절차가 적용됩니다. 모든 IP를 127.0.0.1로 사용하십시오.
11. 자주 발생하는 문제
- 접속 직후 바로 끊김 → 암호화 키가 일치하지 않거나 서버가 crypto=false / TCP로 설정되어 있습니다.
- 로그인은 되지만 서버 입장 시 멈춤 → serverIp / gamePort가 잘못되었거나 15572 포트가 닫혀 있습니다.
- 서버가 시작 시 ODBC 오류로 종료됨 → 드라이버가 설치되지 않았거나 이름이 설정 파일과 다릅니다.
- 서버가 시작 시 "password authentication failed"로 종료됨 → HDKO_PG_PASSWORD가 설정되지 않았거나 틀렸습니다.
- pg_restore 버전 오류 → pg_restore 버전이 18보다 낮습니다.
- 수천 개의 "Cannot open include" 오류 → VS 환경이 로드되지 않았습니다. 오래된 build_target.bat은 사용하지 마십시오.
- .uasset 파일이 수백 바이트이고 프로젝트가 열리지 않음 → LFS 없이 클론되었습니다. git lfs install 및 git lfs pull을 실행하십시오.
법적 고지 및 면책 조항 (Disclaimer)
본 프로젝트는 게임을 기반으로 한 교육, 연구 및 포트폴리오 개발 목적의 비영리 팬 메이드(fan-made) 작업물입니다.
- 지식재산권: 원작 게임에 관련된 모든 컨셉, 캐릭터, 그래픽, 음향 효과, 배경음악 및 상표권은 원 저작권자에게 있습니다. 본 프로젝트는 해당 요소들에 대해 어떠한 권리나 소유권도 주장하지 않습니다.
- 사용 목적: 본 저장소(Repository) 및 소스 코드는 순수하게 소프트웨어 아키텍처, 게임 메커니즘 및 프로그래밍 기법을 공유하고 시연하기 위한 목적으로만 배포되었습니다. 본 프로젝트를 통해 직·간접적인 어떠한 금전적 수익도 창출하지 않습니다.
- 삭제 요청: 저작권자 또는 권리권자의 이의 제기나 삭제 요청이 있을 경우, 통지를 받는 즉시 본 프로젝트와 관련 코드는 지체 없이 게시 중단 및 삭제 처리됩니다.
- ____________
大家好,
我们利用业余时间基于虚幻引擎 5.8 (Unreal Engine 5.8) 开发的项目现已完成,详情请见下方链接。任何人都可以根据自己的需求,对服务端和客户端进行全方位的修改与定制。项目中整合了数十种编辑器、导入器 (Importer) 和导出器 (Exporter) 工具,相信对新手朋友会大有帮助。无论您是想打包构建到移动端还是 Mac 电脑,均可自由运行。
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.
本项目包含全新重构的客户端,以及为实现跨平台从零打造、与客户端完全匹配的服务端。为满足跨平台适配,数据库采用 PostgreSQL 编写。项目支持向下兼容 24xx 服务端,客户端均可无缝连接;甚至可以直接使用该客户端登录原版 U*KO。简而言之,无论在 Windows 还是 Linux 系统下都可以稳定运行服务端。
包含完整素材资源 (Assets) 和数千份文档的 Git 仓库链接如下(项目整体体积约为 30GB 左右)。UKO / KOEKO 的所有活动 (Events) 和道具 (Items) 均已包含在项目中。
*** Gizli metin: alıntı yapılamaz. ***
*** Gizli metin: alıntı yapılamaz. ***
为了给我们玩了多年的这款经典游戏注入现代行业标准与全新活力,服务端的所有代码均经过了 5000+ 项测试检验(涵盖各项任务逻辑),全部 Lua 脚本文件也都逐一进行了严格审查。祝大家开发愉快,尽情拓展!
- HDKO 编译与运行指南(服务器 + 客户端)
开始前须知三点:
- 仓库自带的 development.json 无法让客户端连接。该文件使用 TCP 且关闭了加密,而客户端始终使用 Web 动创建 local.json(第 6 步)。
- 备份文件虽然是 .sql 扩展名,但不是普通 SQL。它们是用 PostgreSQL 18.4 生成的 pg_dump 自定义格式归档。psql -f 无法读取,需要使用 pg_restore 18。
- 仓库中没有服务器加密密钥。如果您没有密钥文件,需要生成一对新密钥并分别粘贴到两端。
1. 前置要求
两端都需要:
- Windows 10/11 x64
- Git 和 Git LFS。Content 文件夹存放在 LFS 中。如果在未安装 LFS 的情况下克隆,.uasset 文件只会以指针形式下载,项目无法打开。
- Visual Studio 2022(17.8+)或 VS 2026
- 工作负载:"Desktop development with C++" 和 "Game development with C++"
- 组件:MSVC x64、Windows SDK、"C++ CMake tools"(提供 CMake 和 Ninja)、.NET
- Python 3.10+,并加入 PATH。build.bat 在编译前会运行审计脚本;没有 Python 编译会失败。
仅服务器:- vcpkg:git clone
Ziyaretçiler için gizlenmiş link,görmek için Giriş yap veya üye ol.C:\vcpkg,然后运行 bootstrap-vcpkg.bat。首次编译时会自动安装依赖。- PostgreSQL 18
- psqlODBC x64:ODBC 驱动列表中的名称必须完全显示为 "PostgreSQL Unicode(x64)"。
- Node.js 20+:可选,仅用于 dashboard。
仅客户端:- Unreal Engine 5.8
- 300 GB 以上可用磁盘空间
- 支持 DX12 / SM6 的显卡
2. 获取源码
示例中服务器的局域网 IP 为 192.168.1.100,请在所有地方替换为您自己的 IP。Kod:git lfs install git clone <repo-url> HDKO cd HDKO git lfs pull
3. 数据库
- 安装 PostgreSQL 18。为 postgres 用户设置密码(示例:hdko2026),端口保持 5432。
- 安装 psqlODBC x64。
- 创建数据库并恢复备份:
Kod:set PGPASSWORD=hdko2026 createdb -U postgres HDKO_DATABASE_SERVER_001 pg_restore -U postgres -d HDKO_DATABASE_SERVER_001 --no-owner "Server\DatabaseBackup\05.10.2026-clean.sql"
共有三个备份文件:备份日期为 2026.10.05。如果服务器提示"缺少表/列"而无法启动,说明缺少之后新增的 migration;请参阅 Server/docs/sql/README.md。
- 05.10.2026-clean.sql:237 张在用表。请使用此文件。
- 2026-10-05-dropped.sql:285 张废弃表。
- 05.10.2026.sql:两者合计,522 张表。
游戏账号:AUTO_REGISTER 默认开启。首次登录时会用您输入的 ID 和密码自动创建账号。
4. 加密密钥(两端必须匹配)如果您有服务器密钥文件(HDKOCryptServerKeys.h),直接复制进去即可。否则请生成新的密钥对:
- 客户端:Source/HDKO/Security/HDKOCryptKeys.cpp。已纳入 git,存放固定的公钥。
- 服务器:Server/core/crypto/HDKOCryptServerKeys.h。不在 git 中,存放私密 seed。模板为 .example 文件,内容全为零,因此不会接受任何连接。
- 在 "x64 Native Tools Command Prompt" 中运行:
Kod:cd Tools\hdkocrypt_keygen build.bat > keys.txt生成新密钥后,用旧密钥编译的客户端将无法再连接。
- 将 CLIENT 块粘贴到 HDKOCryptKeys.cpp。
- 将 SERVER 块粘贴到 Server/core/crypto/HDKOCryptServerKeys.h。输出中写的是 "shared/..." 路径,但该路径已过时。
- 删除 keys.txt。
5. 编译服务器
按您的机器修改 Server/build.bat 中的两行:
然后编译:Kod:set "VCPKG_ROOT=C:\vcpkg" cd /d "C:\Users\<您的用户名>\Documents\Unreal Projects\HDKO\Server"
Kod:cd Server build.bat
- 依次执行:审计检查、cmake configure(首次较慢)、8 个并行任务编译、安装到 Server/release 文件夹。
- 最后一行为 BUILD_ALL_OK 即表示编译成功。
- 如果编译在没有错误信息的情况下中断,说明内存不足:执行 set HDKO_BUILD_JOBS=4 并关闭 Unreal 编辑器。
6. 服务器配置
Start.bat 使用 config\local.json。该文件不在 git 中,需要自己创建:
- 将 development.json 复制为 local.json。
- 修改下列值。
- admin.bindAddress 保持 127.0.0.1。切勿对外开放 9130 端口。
- 将文件复制到 Server/release/config,或重新运行 build.bat。
local.json 中需要修改的值:- crypto.enabled → true
- login.net.transport 和 game.net.transport → "WS"
- login.net.bindAddress 和 game.net.bindAddress → "0.0.0.0"
- login.net.port → 15100
- game.net.port → 15572
- serverList[0].lanIp 和 serverIp → "192.168.1.100"(发送给客户端的游戏服务器地址)
- serverList[0].gamePort → 15572
- database.driver → "PostgreSQL Unicode(x64)"
密码写在环境变量中,而不是 JSON 中:- HDKO_PG_PASSWORD → 数据库密码。Start.bat 会自行设为 hdko2026;如果您的密码不同,请修改该行。
- HDKO_ADMIN_TOKEN → Admin API 和 dashboard
- HDKO_OPENROUTER_KEY → 机器人聊天,可选
7. 启动服务器
登录服务器(端口 15100)和游戏服务器(端口 15572)会在两个独立的控制台中打开。Kod:cd Server\release scripts\Start.bat
检查清单:打包版本:
- 控制台中不应出现 "error" 行。
- curl localhost:9130/health 应有响应。
- 如果客户端在另一台电脑上,防火墙必须允许 TCP 15100 和 15572 入站连接。
Dashboard(可选):- 修改 dashboard.bat 中的 DASH 路径。
- 将 .env.example 复制为 .env。
- 运行 dashboard.bat 并打开 http://localhost:4000。第一个登录的用户成为 owner。
8. 客户端设置- Source/HDKO/Defs/HDKOBuildConfig.h:HDKO_OFFICIAL_SERVERS 必须为 0。设为 1 时客户端会连接官方 KO 服务器。
- Source/HDKO/Security/HDKONetSecrets.h:在 HDKO_DEFAULT_LOGIN_HOST 行填入服务器 IP("192.168.1.100"),端口保持 15100。
- 在编辑器中 HDKO_DEV_LOCAL = 1。所有打包版本中为 0,客户端会连接生产服务器(wss://login.hd-ko.com:2053)。
- 若要让打包版本连接局域网服务器,请取消文件开头 //#define HDKO_DEV_LOCAL 1 这一行的注释。发布前请改回。
- 游戏服务器的 IP 和端口不写在客户端中,而是来自登录服务器的服务器列表。
- HDKOCryptKeys.cpp:必须包含与服务器 seed 匹配的密钥(第 4 步)。
9. 编译并运行客户端- 右键点击 HDKO.uproject,选择 "Generate Visual Studio project files"。
- 打开 HDKO.sln,选择 Development Editor | Win64 并编译。也可以双击 uproject 并选择 "Yes"。
- 编辑器会打开 IntroScreen 地图。首次启动时着色器编译耗时较长。
- 点击 Play,用新的 ID 和密码登录(账号自动创建),选择服务器,创建角色。
仓库中的 run.bat 仍指向 UE_5.7;使用前请改为 UE_5.8。Kod:"C:\Program Files\Epic Games\UE_5.8\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="C:\Users\<您的用户名>\Documents\Unreal Projects\HDKO\HDKO.uproject" -build -cook -stage -clientconfig=Development -iterate -nopak -noiotstore
10. 示例:一台电脑作服务器,另一台作客户端
服务器电脑(192.168.1.100):单台电脑同样适用;所有 IP 均使用 127.0.0.1。
- 安装 PostgreSQL + ODBC,恢复 05.10.2026-clean.sql 备份。
- 放好服务器密钥。
- 修改 build.bat 中的路径,编译直到出现 BUILD_ALL_OK。
- 创建 local.json(WS、开启加密、0.0.0.0、serverIp=192.168.1.100)。
- 在防火墙中开放 15100 和 15572 端口。
- 运行 Start.bat。
客户端电脑:- 安装 UE 5.8 + VS,使用 LFS 克隆仓库。
- 设置 HDKO_OFFICIAL_SERVERS 0 和 LOGIN_HOST="192.168.1.100";密钥必须与服务器匹配。
- 编译 Development Editor,点击 Play。
11. 常见问题
- 连接后立即断开 → 加密密钥不匹配,或服务器设置为 crypto=false / TCP。
- 登录正常,进入服务器时卡住 → serverIp / gamePort 错误,或 15572 端口未开放。
- 服务器启动时因 ODBC 错误退出 → 未安装驱动,或驱动名称与配置中的不一致。
- 服务器启动时提示 "password authentication failed" → HDKO_PG_PASSWORD 未设置或错误。
- pg_restore 报版本错误 → pg_restore 版本低于 18。
- 出现数千条 "Cannot open include" 错误 → 未加载 VS 环境。不要使用旧的 build_target.bat。
- .uasset 文件只有几百字节,项目无法打开 → 克隆时未安装 LFS。运行 git lfs install 和 git lfs pull
法律声明与免责声明 (Disclaimer)
本项目为非营利性质的粉丝自制 (fan-made) 作品,仅供技术学习、实践交流及作品集展示使用。
- 知识产权: 原版游戏涉及的所有概念、角色、美术图像、音效、音乐及注册商标均归原版权方所有。本项目对上述任何元素均不主张任何权利或所有权。
- 使用目的: 本代码仓库 (Repository) 及其包含的源码仅用于展示软件架构、游戏机制和编程实践。本项目不存在任何直接或间接的商业盈利行为。
- 下架要求: 若版权方或权利持有人对此项目有任何异议或下架诉求,一经收到通知,本项目及所有相关源码将立即下架并删除。