GithubHelp home page GithubHelp logo

assasans / protanki-server Goto Github PK

View Code? Open in Web Editor NEW
31.0 4.0 17.0 2.52 MB

An open-source reimplementation of the ProTanki Server.

License: MIT License

Kotlin 100.00%
tanki-online private-server protanki kotlin

protanki-server's Introduction

Unmaintained

Please note that this project no longer maintained.

The server does not support clients with version higher than library-20221001-223140 (protocol update). The client becomes more and more obfuscated, whch makes it impossible to analyze the new protocol and almost any other changes. At this point it is easier to make a server for the official Tanki Online client than for ProTanki (see Araumi).

Latest supported client version (without resources) is available on the archive.org.

ProTanki Server

CircleCI Discord

The first working ProTanki private server, written in Kotlin.
Warning: this project is WIP.

If you make stupid Issues you're dead.

Build instructions available in building.md.
Database configuration instructions available in database.md.

Video tutorials available on YouTube.

Download

Artifacts are available at CircleCI.

protanki-server's People

Contributors

assasans avatar c6oi avatar kleins0 avatar kor1k1 avatar kuraysdev avatar lxngren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

protanki-server's Issues

The server does not start

With the latest update, the server stopped loading, compilation is successful, but server startup is not.
2022-04-11_18-56-43
2022-04-11_18-49-34

The supplies count.

The supplies count in battles isn't the same as the one in garage. Also the supplies don't work and i think you already know that.

Не появляется окно создания битвы

Шаги воспроизведения:

  1. Запускаем сервер
  2. Заходим в игру
  3. Создаем карту "Лунная тишина" выходим из игры
  4. Заходим в игру и пытаемся создать битву

Даже перезапуск сервера не помогает

Do you wanna create server for TO official?

Hey @Assasans i saw your code of protanki-server.That's cool.Do you wanna try to create server for html5 versioin tanki online on kotlin/java myabe something on rust??? For official tanki online https://tankionline.com/play/ . We can download their client from someone test server - https://test.tankionline.com/ .Im already tries do this 2 years ago but i couldnt cuz i cant understand their protocol but i could run client from my server .I think i already lost all of mine code for it but maybe and not but i have a lot of screen with it. Maybe you already understand it or we can do it together?

I think it not will be problem for us.
email: [email protected]
telegram: 89879203004
facebook: facebook.com/anton.sibgatulin.7

Running the server on Windows

i made a new .bat file with the command java jp.assasans.protanki.server.Server ProTankiServer-0.1.0.jar it doesn`t work.
What should i put?

Maps

Может добавить карт можно еще?
Там нужен айди и крч пж сделайте.

[Error] Creating a match results in an error

When creating a match, the following error occurred.

Match Characteristics:
Mode: "Every man for himself"
Pro Battle: No
Closed battle: No

[21:06:25.896 24/03/2022] [jp.assasans.protanki.server.client.UserSocket/ERROR]: Failed to call BattleCreate::CreateBattle handler java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97) at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113) at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108) at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159) at kotlin.reflect.full.KCallables.callSuspendBy(KCallables.kt:74) at jp.assasans.protanki.server.client.UserSocket.processPacket(UserSocket.kt:243) at jp.assasans.protanki.server.client.UserSocket.access$processPacket(UserSocket.kt:56) at jp.assasans.protanki.server.client.UserSocket$handle$4.invokeSuspend(UserSocket.kt:318) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) Caused by: java.util.NoSuchElementException: Collection contains no element matching the predicate. at jp.assasans.protanki.server.battles.map.MapRegistryKt.get(MapRegistry.kt:61) at jp.assasans.protanki.server.commands.handlers.LobbyHandler.createBattle(LobbyHandler.kt:203) ... 18 more

Build Failed

Task :compileKotlin FAILED
e: protanki-server-main\build\generated\source\buildConfig\main\main\jp\assasans\protanki\server\BuildConfig.kt: (6, 36): Const 'val' initializer should be a constant value
e: protanki-server-main\build\generated\source\buildConfig\main\main\jp\assasans\protanki\server\BuildConfig.kt: (6, 36): Unresolved reference: UNKNOWN

Guns not syncing to clients

image

i was playing with 2 of my friends, and every gun shot correctly. almost everything but railgun does not show on other screens when you shoot it though

When player leaves.

When another player leaves and one is in the battle the one in the battle will still see the player that left.

There is no menu with map creation

Everything was compiled successfully, but nothing appears on the create button, I tried to download and compile again, but it didn't hel
2022-04-12_16-56-28
p

Please post game resources

Please feel free to post resources. There is a server, there is a client, but there are no resources. Well, or at least tell me where to get IDs

Can we have chat?

I think you will soon add a working chat but please also add /addcry and /addscore

Physics

The pushback of Twins is way too big and the pusuback of thunder is way too small.

addxp bug

Когда используеш комманду addxp в гараже, то гараж багается и у вещей появляется дупликат. Можно сделать как в пт когда ты в гараже пишеш addxp то там перезагружается гараж.

Cannot create battle

[jp.assasans.protanki.server.client.UserSocket/ERROR]: Failed to call BattleCreate::CreateBattle handler
com.squareup.moshi.JsonDataException: Required value 'equipmentConstraintsMode' missing at $
at com.squareup.moshi.internal.Util.missingProperty(Util.java:660)
at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapter.fromJson(KotlinJsonAdapter.kt:105)
at com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:41)
at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:70)
at jp.assasans.protanki.server.commands.CommandArgs$Companion.convert(CommandHandlerDescription.kt:33)
at jp.assasans.protanki.server.client.UserSocket.processPacket(UserSocket.kt:259)
at jp.assasans.protanki.server.client.UserSocket.access$processPacket(UserSocket.kt:73)
at jp.assasans.protanki.server.client.UserSocket$handle$3.invokeSuspend(UserSocket.kt:318)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

ProTanki protocol

Hey @Assasans,
I'm not sure if you're still interested in this project or if you have moved on.
Nevertheless you wrote that you have a quite some trouble with the protocol after the protocol update.

I've attached you a dump of all packet ids, their fields as well as the model ids they belong to.
Additionally I added my own list of human friendly names for easy understanding (please note that this list is not complete as I mainly created it for my own purposes).

If you're interested I can share more details about the protocol so you can easily implement the new one.
Except for the encoding (and a few adjustments here and there) I haven't encountered any big changes.

pt-encryption-context.as.txt
human-packet-names.txt
pt-scpacker-packets.txt

Regards
Markus

I can't compile.

I keep failing at the psrt where i hsve to compile this project. Can you please make a folder in the code where we have a compiled version of this server?

Server unable to load maps

I know this project focuses on remaking Protanki exactly, and my problem is that I cannot load a replaced map, but this happened to maps that are included with the server, so I thought I would make this issue anyway.
Replacing maps used to work in the past, but it doesn't now.
The server is stuck at this line forever [jp.assasans.protanki.server.client.UserSocket/TRACE]: Sent command Battle::InitBonuses [[]] and nothing happens afterwards. Is there a way to get around this?

Thanks.

About the servee

Do you have news about the project if you will make it and if you can make it work in a way that we will not get same issues?

Maps

  • 2042 (summer, day)
  • 2042 (winter, day)
  • abyss (summer, day)
  • abyss (winter, day)
  • aleksandrovsk (summer, day)
  • aleksandrovsk (winter, day)
  • aleksandrovsk (summer, night)
  • arena (summer, day)
  • arena (winter, day)
  • atra (summer, day)
  • atra (winter, day)
  • barda (summer, day)
  • barda (winter, day)
  • barda (summer, night)
  • berlin (summer, day)
  • berlin (winter, day)
  • bobruisk (summer, day)
  • bobruisk (winter, day)
  • boombox (summer, day)
  • boombox (winter, day)
  • brest (summer, day)
  • brest (winter, day)
  • bridges (summer, day)
  • bridges (winter, day)
  • camp (summer, day)
  • camp (winter, day)
  • canyon (summer, day)
  • canyon (winter, day)
  • chornobyl (summer, day)
  • chornobyl (winter, day)
  • combe (summer, day)
  • combe (winter, day)
  • courage (summer, day)
  • courage (winter, day)
  • cross (summer, day)
  • cross (winter, day)
  • deathtrack (summer, day)
  • deathtrack (winter, day)
  • deck9 (summer, day)
  • deck9 (winter, day)
  • desert (summer, day)
  • desert (winter, day)
  • dualiti (summer, day)
  • dualiti (winter, day)
  • duel (summer, day)
  • duel (winter, day)
  • dusseldorf (summer, day)
  • dusseldorf (winter, day)
  • edinburgh (summer, day)
  • edinburgh (winter, day)
  • esplanade (summer, day)
  • esplanade (winter, day)
  • factory (summer, day)
  • farm (summer, day)
  • farm (winter, day)
  • forest (summer, day)
  • forest (winter, day)
  • fortknox (summer, day)
  • fortknox (winter, day)
  • future (summer, day)
  • future (summer, night)
  • garder (summer, day)
  • garder (winter, day)
  • gravity (summer, day)
  • gravity (winter, day)
  • gubakha (summer, day)
  • gubakha (winter, day)
  • highland (summer, day)
  • highland (winter, day)
  • highway (summer, day)
  • highway (winter, day)
  • hill (summer, day)
  • hill (winter, day)
  • industrial_zone (summer, day)
  • industrial_zone (winter, day)
  • iran (summer, day)
  • iran (winter, day)
  • island (summer, day)
  • island (winter, day)
  • kolhoz (summer, day)
  • kolhoz (winter, day)
  • kungur (summer, day)
  • kungur (winter, day)
  • losttemple (summer, day)
  • losttemple (winter, day)
  • madness_space (space)
  • madness_old (space)
  • magadan (summer, day)
  • magadan (winter, day)
  • magistral (summer, day)
  • magistral (winter, day)
  • massacre (summer, day)
  • massacre (winter, day)
  • molotov (summer, day)
  • molotov (winter, day)
  • montecarlo (summer, day)
  • montecarlo (winter, day)
  • noise (summer, day)
  • noise (winter, day)
  • novel (summer, day)
  • novel (winter, day)
  • opposition (summer, day)
  • opposition (winter, day)
  • osa (summer, day)
  • osa (winter, day)
  • parma (summer, day)
  • parma (winter, day)
  • pass (summer, day)
  • pass (winter, day)
  • pingpong (summer, day)
  • pingpong (winter, day)
  • platform (space)
  • polygon (summer, day)
  • polygon (winter, day)
  • polygon (summer, night)
  • redalert (summer, day)
  • redalert (winter, day)
  • rift (summer, day)
  • rift (winter, day)
  • rio (summer, day)
  • rio (summer, night)
  • sandal (summer, day)
  • sandal (winter, day)
  • sandbox (summer, day)
  • sandbox (winter, day)
  • sandbox (summer, night)
  • scope (summer, day)
  • scope (winter, day)
  • serpuhov (summer, day)
  • serpuhov (winter, day)
  • shortbridge (summer, day)
  • shortbridge (winter, day)
  • siege (summer, day)
  • siege (winter, day)
  • silence (summer, day)
  • silence (winter, day)
  • silence (summer, night)
  • silence_moon (space)
  • skylark (summer, day)
  • skylark (winter, day)
  • skyscrapers (summer, day)
  • skyscrapers (space)
  • solikamsk (summer, day)
  • solikamsk (winter, day)
  • stadium (summer, day)
  • stadium (winter, day)
  • stadium (summer, night)
  • station (summer, day)
  • station (winter, day)
  • subway (summer, day)
  • subway (winter, day)
  • tribute (summer, day)
  • tribute (winter, day)
  • valley (summer, day)
  • valley (winter, day)
  • wave (summer, day)
  • wave (winter, day)
  • wolfenstein (summer, day)
  • wolfenstein (winter, day)
  • zone (summer, day)
  • zone (winter, day)

Почему, это может быть?

Failed to call BattleSelect::Fight handler
java.util.NoSuchElementException: Collection contains no element matching the predicate.
at jp.assasans.protanki.server.battles.map.MapRegistryKt.getProplib(MapRegistry.kt:120)
at jp.assasans.protanki.server.commands.handlers.LobbyHandler.fight(LobbyHandler.kt:148)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159)
at kotlin.reflect.full.KCallables.callSuspendBy(KCallables.kt:74)
at jp.assasans.protanki.server.client.UserSocket.processPacket(UserSocket.kt:266)
at jp.assasans.protanki.server.client.UserSocket.access$processPacket(UserSocket.kt:71)
at jp.assasans.protanki.server.client.UserSocket$handle$3.invokeSuspend(UserSocket.kt:314)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

    это связано с картой которую я добавил всё прописал и такая ошибка

(help wanted) Как добавлять карты

Можете рассказать как самому можно разобратся как добавлять карты? Я знаю что вы сами потихоньку все доробатывайте и делаете, но мне интерессно как оно так делается.
Я как понял они уже есть в клиенте, но надо найти айди карты через дебаг (мне друг подсказал) который находится на сервере пт и нужны еще json файлы где спавн точки и тд, но я хз как это найти и все это крч

Кста посмотрел на код хотя я не шарю как пишутся сервера, могу сказать что вы полные красавцы и делаете а*уенную вещь покачто!

How do we?

can we re-brand this and deploy it to another server? if so how does the deploy works?

Lose connection having flag

When a player loses connection and it has flag when he enters back the flag is still on his NO MATTER WHAT!!!
When you try to capture you cant when you die you still have the flag after respawn!
Plz fix

Client connect to server

How do i connect the client to the server?
I have tried editing the PreLauncher file but it doesn`t work. I tried to make it load a local socket.cfg file and there i put 127.0.0.1

Running the server

hey, im a coding noob, and i have no idea on how to run the server. the .jar file exits on running it, i have no idea how to make it work?
could you please provide an tutorial on how to run it, or include it in your readme

{Request}

Can we have the resources folder saved local?

Where to find client

Where can i find the client so i can test out the game? Do i use the actual protanki client, and modify the socket?? Confused as there is no client download anywhere

Не загружает в битву со спектатора.

Случай, когда режим спектатора загружается:

  1. Запуск сервера.
  2. Человек, который заходит первый на сервер, может создать битву и зайти в неё со спека.
  3. После этого остальные люди могут заходить в битву.

Но, если на карте уже кто-то был/есть, со спектатора невозможно зайти.

Weapon handlers

  • Flamethrower
    • Tank heating
  • Freeze
    • Tank freezing
  • Isida
  • Railgun
    • Fire through multiple tanks (damage weakening)
  • Ricochet
    • Self-damage
  • Shaft
    • Arcade mode
    • Sniping mode
  • Smoky
    • Critical shots
  • Thunder
    • Splash damage
    • Self-damage
  • Twins

Endless loading

When i try to enter a battle i get endless loading and i have to restart the server few times untill it works. Also i can`t enter using a different turret than railgun or hull than hornet. Please fix!

why?

Exception in thread "main" com.squareup.moshi.JsonEncodingException: Use JsonReader.setLenient(true) to accept malformed JSON at path $
at com.squareup.moshi.JsonReader.syntaxError(JsonReader.java:243)
at com.squareup.moshi.JsonUtf8Reader.checkLenient(JsonUtf8Reader.java:1152)
at com.squareup.moshi.JsonUtf8Reader.doPeek(JsonUtf8Reader.java:384)
at com.squareup.moshi.JsonUtf8Reader.peek(JsonUtf8Reader.java:206)
at com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:38)
at com.squareup.moshi.JsonAdapter$3.fromJson(JsonAdapter.java:249)
at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:70)
at jp.assasans.protanki.server.garage.GarageMarketRegistry.load(GarageMarketRegistry.kt:55)
at jp.assasans.protanki.server.Server.run(Server.kt:48)
at jp.assasans.protanki.server.MainKt.main(Main.kt:150)
at jp.assasans.protanki.server.MainKt$main$6.invoke(Main.kt)
at jp.assasans.protanki.server.MainKt$main$6.invoke(Main.kt)
at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inlined$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$1.invokeSuspend(IntrinsicsJvm.kt:205)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
at kotlin.coroutines.jvm.internal.RunSuspendKt.runSuspend(RunSuspend.kt:19)
at jp.assasans.protanki.server.MainKt.main(Main.kt)

    меняю васп вот такая ошибка почему?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.