TWITCH INTEGRATION AND RANDOM GAMEPLAY MODS
The original Half-Life Twitch integration proof of concept was done long time ago: after a new year night at 4AM, but since then work on Half-Payne stopped until now. The idea of bringing Twitch chat into Half-Life came from already having gameplay mods implemented and also Clustertruck, which has simillar feature: people vote on how to change the gameplay to make it easier or worse.
Proof of concept was made in an hour or two after finding out about libircclient. Twitch chat can be connected via IRC and that's exactly how it's done here. IRC client also runs in a thread separate from Half-Life. I'm not sure if you can handle IRC in a single thread becuase libircclient doesn't seem to provide means to handle it's internal listening loop.
Having Twitch chat support wasn't enough to make anything fun from it, it had to affect gameplay, but Half-Payne wasn't yet suited to dynamically enable or disable gameplay mods. Some work has been done only to ease accessing mods state, and then a huge hiatus occured - I was focusing on a certain job and also left travelling this summer. After a month of my return I got back working on the mod and made managing gameplay mods even more easier for myself, perhaps defining them in more declarative way being one of the greatest things I've done for myself.
Declarative approach to gameplay mods was a huge help when it came to making them rotate randomly. Each gameplay mod has some internal info that could be filtered upon: some mods can't be included in rotation no matter what, some mods should be randomly enabled only when you have a certain weapon - all of this is specified in a convenient way.
As for Twitch integration, so far it features:
- Viewers can vote on which random gameplay mod will be chosen next
- Twitch chat can be relayed to Half-Life
- Half-Life 'say' commands can be relayed to Twitch chat
- Short Twitch chat messages can be shown for a short time after killing someone
All of these features are optional and can be turned off
If you have any suggestions about gameplay mods that should be made - post them in comments.