thmsndk / Screeps3D

A 3D client for the MMORTS Screeps.com
90 stars 17 forks source link

PVP Spectate #96

Open thmsndk opened 4 years ago

thmsndk commented 4 years ago

gathering input / ideas about pvp spectate to make streams more interesting

So when streaming swc, and it jumping betweem rooms, are their any particular rules you would want for room selecting, what is interesting to watch during peacetime, what kind of pvp is more interesting?

Comments from slack:

thmsndk commented 4 years ago

Do we want it to stick around a room untill the battle is finished? when is a battle "boring" enough to swap to another room?

currently we stick around for 30 seconds, even when the room is empty. should probably switch rooms if it is empty. usuakky because the combatants move to anothrer room, or one of them runs away

Perhaps utilize the data of the world map to determine how many players are in a room, we can't just call the pvp endpoint all willy nilly :)

thmsndk commented 4 years ago

Because ags is a hero, admin-utils now have a "warpath" websocket we can subscribe too.... ❤️ https://github.com/ScreepsMods/screepsmod-admin-utils/compare/bca074ca23de...98d0ab6edddc

{
    "channel": "warpath",
    "id": "battles",
    "type": "warpath",
    "data": [{
            "room": "W14S6",
            "shard": "screepsplus2",
            "classification": 0,
            "defender": "false or username",
            "attackers": ["username1", "username2"],
            "lastPvpTime": 3328660,
            "powerCreeps": [{
                    "name": "x",
                    "className": "operator",
                    "level": 1,
                    "powers": {
                        "power": "PWR",
                        "level": 0
                    }
                }
            ],
            "stronghold": 0,
        }
    ],

}

can subscribe to either warpath:battle to get individual records, or warpath:battles to get an array, both are sent out at the end of each tick

thmsndk commented 4 years ago

Ags also mentioned loan battles for use on MMO, we would be able to fetch data from here instead of the websocket for the same, albeit delayed functionality on official server ,https://www.leagueofautomatednations.com/vk/battles.json

as a note, the battle format is slightly different from the warpath battles endpoint that we have for mmo on loan, I added room and shard to each entry and made it an array rather than a keyed object. I find arrays easier to work with in many cases. otherwise, its identical (literally copied the vk class used for battle classifications)

AlinaNova21 commented 4 years ago

Side note on that quote, the formats are different, since the socket is sending the internal format and the battles.json is a different db format.