Open ChillerDragon opened 2 months ago
I would propose the following. Teeworlds vanilla prediction should be the baseline. Everything else including ddrace should be opt in on a specific per feature basis. No implicit predictions based on gametypes.
Remove GAMEINFOFLAG_PREDICT_VANILLA
and replace it with:
GAMEINFOFLAG_PREDICT_DDRACE_WEAPONS
GAMEINFOFLAG_PREDICT_DDRACE_HEALTH
GAMEINFOFLAG_PREDICT_DDRACE_ARMOR
GAMEINFOFLAG_PREDICT_DDRACE_STOPPA
GAMEINFOFLAG_PREDICT_DDRACE_SWITCHER
GAMEINFOFLAG_PREDICT_DDRACE_WEAPON_TUNES
(https://github.com/ddnet/ddnet/pull/9010)When looking at the flags being sent it should be obvious what they do. Not like currently where GAMEINFOFLAG_GAMETYPE_FNG
might mean that it applies a custom hardcodet hammer tuning value or nobody knows what should happen when both GAMEINFOFLAG_PREDICT_DDRACE
and GAMEINFOFLAG_PREDICT_VANILLA
are set or how GAMEINFOFLAG_PREDICT_DDRACE_TILES
and GAMEINFOFLAG_PREDICT_DDRACE
are related. For backwards and non ddrace based server compatibility all these flags can be implied by the gametype but modern flags should be precise, flexible and non ambiguous.
It can still support third party gametypes but that also on a per feature basis. So instead of GAMEINFOFLAG_PREDICT_FNG
there should be a GAMEINFOFLAG_PREDICT_FNG_HAMMER
.
There should not be more customization options like that without a clear use case. This rules out your proposal (currently) because I don't see a clear use case for each flag.
There should not be more customization options like that without a clear use case. This rules out your proposal (currently) because I don't see a clear use case for each flag.
The use case is clearer code. And more flexibility for prediction. This would allow using ddrace features in non ddrace modifications. Such as vanilla weapons and damage with stoppers and speedups.
With a "clear use case", I mean a concrete project that you have in mind and a specific flag you'd need for that.
With a "clear use case", I mean a concrete project that you have in mind and a specific flag you'd need for that.
ddnet-insta is the concrete project. It is pvp but also has the ddrace tiles. For CTF/DM based modes it is currently required to turn off ddnet prediction because of heart and shield which breaks anti ping for ddrace tiles.
I would like to change the approach from having wrongly predicted mods first and then some hacky support from ddnet later to a more proactive approach. Where ddnet is flexible enough so innovation can happen without breaking prediction.
Seems to be a duplicate of https://github.com/ddnet/ddnet/issues/7853
What DDRace tiles do you use in ddnet-insta?
What DDRace tiles do you use in ddnet-insta?
Everything but vanilla pickups (no ddrace weapons, shields and armor).
But I do not want to add another PREDICT_DDNET_INSTA flag. But make sure prediction flags are flexible for every project by opting in to ddrace prediction on a per feature basis.
When introducing vanilla pickups (armor, health, weapons being collectable and having a different effect than ddrace) the GAMEINFOFLAG_PREDICT_DDRACE has to be removed otherwise ddnet's anti ping removes weapon when touching armor. Removing that flag then breaks all the ddrace tiles that do not conflict with vanilla pickups. Such as stoppers.
So having vanilla pickups mixed with ddrace tiles will never predict correctly. I really think there should be a way for custom servers that want vanilla armor/health/weapons to also predict stoppers/freeze/draggers correctly.
I do understand that having vanilla plus ddrace tiles in the gameplay seems a bit crazy. But its a decade old common desire of the ddnet tinkerer. Also there are already these flags related to gametypes and prediction:
So adding yet another one that has to be backwards, forward and sideways compatible introduces a lot of complexity. Also the combination of flags becomes non trivial.
I am ready to implement and test the flag. But we need to have some discussion first about what it should do and how it should work. And how it should be called. Here are some options, ideas and questions:
GAMEINFOFLAG_PREDICT_VANILLA_PICKUPS
which overrulesGAMEINFOFLAG_PREDICT_DDRACE
but only on the tiles/entities that are shared between vanilla and ddrace?GAMEINFOFLAG_PREDICT_VANILLA
to overruleGAMEINFOFLAG_PREDICT_DDRACE
?GAMEINFOFLAG_PREDICT_DDRACE_TILES
which controls switch prediction (but not stoppers lol) should we have anotherGAMEINFOFLAG_PREDICT_DDRACE_ENTITIES
which affects pickups like armor/health/weapons?GAMEINFOFLAG_PREDICT_DDRACE_HEALTH
,GAMEINFOFLAG_PREDICT_DDRACE_ARMOR
which predicts ddrace freeze and ddrace removing weapons when set and defaults to vanilla behavior otherwise. Because as of right now its a bit non obvious what the difference betweenGAMEINFOFLAG_PREDICT_DDRACE
,GAMEINFOFLAG_PREDICT_DDRACE_TILES
andGAMEINFOFLAG_PREDICT_VANILLA
is.Tagging in some ddnet modders that might care: @JSaurusRex @fokkonaut @Kaffeine What kind of predictions do you need?