Home > Computer, Garry's Mod, Lua, Steam > Videos in GMod and other things

Videos in GMod and other things

yasadToday 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).

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Categories: Computer, Garry's Mod, Lua, Steam Tags:
  1. Smile
    March 19th, 2009 at 01:27 | #1

    Ooh, does it play audio from the videos too?

  2. March 19th, 2009 at 11:22 | #2

    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.

  3. fonix232
    March 19th, 2009 at 13:25 | #3

    Fantastic! you should include this in the Stargate Mod, like a television, with the stargate episodes in it…

  4. March 19th, 2009 at 15:12 | #4

    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.

  5. March 19th, 2009 at 17:59 | #5

    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.

  6. Mp6
    March 25th, 2009 at 23:40 | #6

    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.

  7. March 26th, 2009 at 02:03 | #7

    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.

  1. No trackbacks yet.

Click to Insert Smiley

SmileBig SmileGrinLaughLOLFrownBig FrownWinkKissRazzAngelAngryReally AngryConfusedNeutralThinkingChicCoolNerdSillyDrunken RazzMad RazzEvil GrinMeanPissed OffReally PissedCurseShoutGrit TeethCryWeepSide FrownWiltSmugDisdainRoll EyesSarcasmLoserTalk to the HandShyBeat UpPainShameBeautyBlushCuteLashesKissingKiss BlowKissedHeh!SmirkSnickerGiggleIn LoveDroolEek!ShockSickSuspenseTrembleDazedHypnotizedFoot in MouthMoney MouthQuietShut MouthDOH!IDKQuestionLyingStruggleSweatStopByeGo AwayWavingTime OutCall MeOn the PhoneMeetingSecretHandshakeHigh FiveHug LeftHug RightClapDanceJumpFingers CrossedVictoryYawnSleepyPrayWorshipWaitingAlienClownCowboyCyclopsDevilDoctorFemale FighterMale FighterMohawkMusicPartyPirateSkywalkerSnowmanSoldierGhostSkeletonEatStarvingVampireZombie KillerBunnyCatCat 2ChickChickenChicken 2CowCow 2DogDog 2DuckGoatHippoKoalaLionMonkeyMonkey 2MousePandaPigPig 2SheepSheep 2ReindeerSnailTigerTurtleFemaleMaleHeartBroken HeartRoseDead RosePeaceYin YangUS FlagMoonStarSunCloudyRainThunderUmbrellaRainbowMusic NoteYesNoAirplaneCarIslandAnnouncebrbBeerDrinkLiquorCakeCoffeePizzaWatermelonBowlPlateCanMailCellPhoneCameraFilmTVClockLampSearchCoinsComputerConsolePresentSoccerCloverPumpkinBombHammerKnifeHandcuffsPillPoopCigarette