PinionTech / pinion-adverts-gmod

Pinion Adverts for Garry's Mod
2 stars 2 forks source link

Gamemode integration #7

Open azuisleet opened 11 years ago

azuisleet commented 11 years ago

We should identify what gamemodes we likely want to integrate into and how.

For example in TTT we could display an ad after you're dead, where you'd otherwise be spectating players. Another example is theater gamemodes, where you could place ad spots in the video queues for public rooms.

azuisleet commented 11 years ago

We're also interested in exposing an interface to give rewards to players for viewing an ad. Likely a gamemode hook such that they can upgrade/grant a player something in return for completing an ad.

azuisleet commented 11 years ago

I've added a show_mode cvar for users to configure whether they'd like ads to show up in the gamemode as well as a cooldown that applies to it. Currently I'm looking at the PlayerDeath event for zombiesurvival, TTT, and DarkRP. This is the most general integration we can do, as in the round based gamemodes you have one life per round.

Where we need to look out is how to decide if we're showing an ad right before a round would end (since win conditions aren't time based). I'm wondering if want to support clearing the required duration if the round ends, or if we want to let users balance the maximum viewing time with their server. Both gamemodes have enough setup time that a reasonable duration would likely fit.

davidbanham commented 11 years ago

So in some game modes there might be an MOTD opportunity both on death and on round end? It might make sense to have different max_durations depending on which event triggered the ad.

We may also need to implement a minimum interval check to ensure we're not displaying the MOTD too frequently.

azuisleet commented 11 years ago

Yes there is a minimum interval check to prevent showing the MOTD too frequently. I can also definitely have a second configurable max_duration to allow some flexibility on round end/death.