#How to make can reconnect at late game?
1 messages · Page 1 of 1 (latest)
Can you explain better? What is being disconnected? Players crashing?
If for some reason a player leaves the match and then tries to reconnect, he has an endless load that will never end. Sometimes it's just a black endless screen, sometimes it says "overflow error"
depend on you project
based if endless loading screen its big package that dota cant process, huge nettables or much entities or huge list of precache (but im not fully shure about last and did not test it but sone peoples here talk about it).
if players got client crush then you can try get screenshot and send it here
Can you say approx limits on net tables or precache? size or count maybe idk
i refactored my custom game and now my nettables size is < 8kb all game, but still players have black screen on reconnection. I also make UnloadSpawnGroupByHandle like in valve custom games and unload creeps/precache when no needed
My global precache
local particles =
{
"particles/ping_custom.vpcf",
"particles/battle_pass/battle_pass_back.vpcf",
"particles/ability_select/ability_color_white.vpcf",
"particles/creep_sended/creep_sended.vpcf",
}
local sounds =
{
"soundevents/game_sounds.vsndevts",
"soundevents/game_sounds_dungeon_enemies.vsndevts",
"soundevents/game_sounds_winter_2018.vsndevts",
"soundevents/game_sounds_heroes/game_sounds_ogre_magi.vsndevts",
"soundevents/game_sounds_creeps.vsndevts",
"soundevents/game_sounds_heroes/game_sounds_legion_commander.vsndevts",
"soundevents/game_sounds_cha_custom.vsndevts",
}
local models =
{
"models/courier/baby_rosh/babyroshan_ti9.vmdl",
"models/courier/baby_rosh/babyroshan_crownfall.vmdl",
"models/courier/baby_rosh/babyroshan.vmdl",
"models/events/frostivus/penguin/penguin_prime.vmdl",
"models/props_gameplay/pig_blue.vmdl",
"models/items/courier/baekho/baekho.vmdl"
}
local units = {
"npc_minigames_arena",
"npc_minigames_mirana",
"npc_minigames_pudge",
"cosmetic_pet"
}
And i precache units by this way
function TryPrecacheUnitAsync(sUnitName, callback)
if sUnitName == nil or callback == nil then return end
if _G.PrecachedUnits[sUnitName] == nil then
_G.PrecachedUnits[sUnitName] = false
PrecacheUnitByNameAsync(sUnitName, function(prec_Id)
_G.PrecachedUnits[sUnitName] = true
Rounds:AddSpawnGroupToRound(prec_Id, sUnitName)
if callback ~= nil then
callback(prec_Id)
end
end)
else
if callback ~= nil then
callback()
end
end
end
and i have ability that precache non-necessary things (above)
It`s all i precache in the game and all i use, idk what do with this black screen
players say that he hear sounds and can send a messages in chat with console command "say"
You know, this endless black screen that crashes later is exactly the same problem I had for a few months and I just fixed it.
My problem was players could not even make the first load into the game, it went for overflow error after 30 seconds of black screen.
My problem was the precache. I mistakenly made the precache load the entire heroes particles, all heroes. I think that the loading precache now has a limit of precaches in a single instance. Your game have a fair precache before the game starts, but once game starts there's now additional particles and models to load when players have selected their heroes.
Try to move your precaches later into the game phases like hero selection and strategy time, try even some timer delay. And detect when a player have finished reconnecting and make a slow precache again.
This is probably all related to Valve changing how the game handle cosmetics and loading features a few months ago to improve performance.
How the precache happens in my game:
- The game loads - global precache
- Strategy stage - precache skill with particles
- The stage of the game is a system of rounds - precache is performed ONLY if this unit has not been precached and ONLY at the moment when it is really needed.
- I also forgot, but I'm precaches like this heroes that used in my game:
"npc_precache_npc_dota_hero_antimage"{
"BaseClass""npc_dota_creep""IsSummoned""1""precache"{"particle_folder" "particles/units/heroes/hero_antimage""soundfile" "soundevents/game_sounds_heroes/game_sounds_antimage.vsndevts"}}
I have this creeps and precaches this when needed.
And i unload all precache when is no needed anymore
Like in this (i unload for example npc_precache_npc_dota_hero_antimage) (CODE BELOW)
Am I precache too much anyway? Players can't reconnect only in the late game, at about 40+ minutes.