Videos in GMod and other things
Today I created a vison I had months ago: Placing HTML-based “adverts” ingame in order to tell people to register on YaS or playing videos ingame.
Coding it was quite hard because I had to use the very poorly documented cam.Start3D2D() function to draw VGUI elements in the world. Well I had success and here is how it looks like. The panels have “animation”-modes in which you can play e.g. youtube videos. But this mode is really expensive and lowers you FPS from 200 to 70 (without animation-mode you have 160 fps if you see such a panel and 200 if not).
Categories: Computer, Garry's Mod, Lua, Steam

GMod
TS3
SVN
Filedump
Ooh, does it play audio from the videos too?
Yes, but sadly localy. That means if you 1 mile away and can hardly see the screen it sounds like it play the music by standing one meter away.
Fantastic! you should include this in the Stargate Mod, like a television, with the stargate episodes in it…
I don’t think so. It just brings issues concerning the movies:
* The HTML-Panel is known to crash clients if spawned too often
* It is really really FPS intensive when playing animations (like movies)
* It plays the sound like it’s 1m away while the SENT it is getting drawn on is maybe 1km away.
It’s becoming better now.
I have a new method now which works like the “GPU” from Wire.
The advantage is, it does not look that pixelish and I don’t get this “black-purple” issue I had before anymore.
Is it easy to set up the advertisements like on your server or is that fairly complicated? If you plan on releasing it you should make it fairly easy to edit and place new advertisements.
I’m only planning to release the base_panel SENT for anyone to use as base (since I have seen so much PURE SHIT so far for doing stuff like I did) and the advert-sent as example.
You still would need to code your own “system to place and configure adverts” then. I can’t release that part, because it’s bound to my addon-loader which is quite private.