1. Post #1
    Gold Member
    AzuiSleet's Avatar
    September 2007
    758 Posts
    This is my second attempt at a browser in gmod. LLMozLib had too many issues, but Awesomium reached a stable point, and shows a lot of potential. This is my binding for it in gmod.

    This uses Awesomium! http://princeofcode.com/awesomium.php



    http://code.google.com/p/gmodmodules/
    http://code.google.com/p/gmodmodules...runk/gm_chrome
    Reply With Quote Edit / Delete Reply United States Show Events Useful x 8Lua King x 5Agree x 3Friendly x 1Disagree x 1Dumb x 1 (list)

  2. Post #2
    Gold Member
    abp1192's Avatar
    July 2006
    583 Posts
    No offense, but there isn't really a point to this. You can just open the steam web browser.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb x 96Disagree x 14Agree x 5Bad Reading x 1Funny x 1 (list)

  3. Post #3
    Mr Affinity's Avatar
    September 2007
    526 Posts
    Holy crap awesomuim.
    Reply With Quote Edit / Delete Reply United States Show Events Funny Funny x 9Dumb Dumb x 1 (list)

  4. Post #4
    Gold Member
    ntzu's Avatar
    August 2005
    1,146 Posts
    Steam Browser doesn't run youtube videos and such ( At least not for me, says I don't have the addon.)
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 13Disagree Disagree x 11Dumb Dumb x 5 (list)

  5. Post #5
    Gold Member
    abp1192's Avatar
    July 2006
    583 Posts
    Steam browser works for me perfectly.
    Either way this is cool, I just have no use for it.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 14Agree Agree x 7Disagree Disagree x 4 (list)

  6. Post #6
    Gold Member
    AzuiSleet's Avatar
    September 2007
    758 Posts
    You clearly have no idea what you're talking about. Valve hasn't done anything with the HTML vgui control. It's still a horrible piece of crap. http://bugs.garrysmod.com/search.php...e_status_id=-2
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 10Disagree Disagree x 1 (list)

  7. Post #7
    Gold Member
    abp1192's Avatar
    July 2006
    583 Posts
    You clearly have no idea what you're talking about. Valve hasn't done anything with the HTML vgui control. It's still a horrible piece of crap. http://bugs.garrysmod.com/search.php...e_status_id=-2
    .... How do I not? Youtube works for me. That is all ever asked. End of story.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 20Disagree Disagree x 2Agree Agree x 1Late Late x 1 (list)

  8. Post #8
    splintered_vein's Avatar
    March 2009
    2 Posts
    Why wouldn't you want to replace Valve's shit browser? It's based on an old IE module and takes way more resources and load time than it should. Thank you AzuiSleet.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 8Friendly Friendly x 1 (list)

  9. Post #9
    GAY LUA DAD's Avatar
    September 2008
    4 Posts
    3d2d browser using this module (think 3GIRC by SamuraiMushroom) + Hulu would be pretty badass.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1 (list)

  10. Post #10
    Gold Member
    Nevec's Avatar
    June 2008
    1,094 Posts
    Can the scrollbars be replaced with custom bars, say, the ones from derma?

  11. Post #11
    Sgt Napalm's Avatar
    October 2008
    173 Posts
    I always keep my GMod in windowed mode (Because it can't run in full screen for some reason), so I just use my default web browser. This is cool, though.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 3Friendly Friendly x 1 (list)

  12. Post #12
    Gold Member
    AzuiSleet's Avatar
    September 2007
    758 Posts
    This isn't supposed to replace your desktop browser. It's for enhancing in-game content with web content. For example, you could put your MOTD on your website and show it ingame. You could draw the browser in 3d2d as well, and load the content from your website.

    The scrollbars are drawn by chrome, I can't do anything about that.

  13. Post #13
    faceless.'s Avatar
    March 2009
    3 Posts
    Google Chrome in Garry's Mod? Sounds stupid.

    (User was banned for this post ("Trolling" - mahalis))
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 29Disagree Disagree x 7Funny Funny x 2 (list)

  14. Post #14
    Gold Member
    Deco Da Man's Avatar
    July 2007
    1,017 Posts
    Google Chrome in Garry's Mod? Sounds stupid.
    On what grounds can you say that that idea is stupid?

    You give no reasons and I doubt you'd be able to provide evidence to support them if you had.

    This an awesome module. I'm currently making my gamemode check if the client has the firefox module, and using it if they do. I'll have to make a new settings pane just for choosing which module to use, now!

    Good work Azui.
    Reply With Quote Edit / Delete Reply Australia Show Events Agree Agree x 6 (list)

  15. Post #15
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    No offense, but there isn't really a point to this. You can just open the steam web browser.
    Which has many many disadvantages:
    [list][*]Delays on keystroke[*]Typing in something to textareas sometimes does not properly work[*]Scrolling sometimes is fucked[*]SLOW AS HELL[/list]and many many more.

    Luckily Azui gave us an alternative. Thanks!
    Reply With Quote Edit / Delete Reply Germany Show Events Agree Agree x 12Informative Informative x 1Dumb Dumb x 1 (list)

  16. Post #16
    Gold Member
    hexpunK's Avatar
    August 2008
    15,659 Posts
    Awesome, I remember the old module for an in game internet browser, I used to use Firebox. hopefully this will allow for a better browser, shame I have no use for it, windowed mode and all. I want to see a 3D2D browser, that would be cool.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Dumb Dumb x 2 (list)

  17. Post #17
    Awesome Job!

    But I will stick with Window Mode. =P
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 3Agree Agree x 1 (list)

  18. Post #18
    mbainrot's Avatar
    August 2008
    178 Posts
    This is my second attempt at a browser in gmod. LLMozLib had too many issues, but Awesomium reached a stable point, and shows a lot of potential. This is my binding for it in gmod.

    This uses Awesomium! http://princeofcode.com/awesomium.php



    http://azuisleet.gayluadad.net/gmode/gm_chrome.zip

    Current bugs:
    You can't resize the browser.
    The JSArguments for onCallback don't work.
    MATE YOUR A BLOODY LEGEND :D :D

    If there was lua king I'd lua king you :)

    Keep up the good work
    Reply With Quote Edit / Delete Reply Australia Show Events Lua King Lua King x 1 (list)

  19. Post #19
    TheDooMCat's Avatar
    April 2007
    10 Posts
    Yay, awesome (it's in the name)!

    Oh, and to all the people going "oh well I can use browsers outside the game"/"the steam browser"... neither of those browsers allow you to actually interact with stuff within the game like this, and its predecessor, gm_llmozlib, do. You can position these browsers within 3D space on the game, and it looks like Azu's working on Javascript callbacks and stuff? So you can control various aspects of the browser with the game/various aspects of the game with the browser.

    I can think of some cool uses for this within Gamemodes.

  20. Post #20
    jonney934's Avatar
    December 2007
    238 Posts
    I want to see what would happen in 3d mode when you visited one of those javascript rick roll websites that go all crazy.
    Reply With Quote Edit / Delete Reply United States Show Events Funny Funny x 3 (list)

  21. Post #21
    Gold Member

    July 2006
    1,963 Posts
    I really hope that this is serverside, just for the sake of 3D2D-possibility.
    Reply With Quote Edit / Delete Reply Finland Show Events Dumb Dumb x 3 (list)

  22. Post #22
    princeofcode's Avatar
    March 2009
    1 Posts
    Pretty nifty use of my library, AzuiSleet! :D

    By the way, I just released v1.01 of Awesomium which should address some of the bugs you're experiencing (corruption of JSArguments in onCallback when using MSVC9 and the resizing bug).

  23. Post #23
    otoris's Avatar
    March 2007
    138 Posts
    Wow, this has huge possibilities and is way better than using steams web browser! I just checked all of Prince of Codes software and was thinking how epic it would be to have Akarui or even NaviLibrary in Garry's Mod. Great stuff though. <3

  24. Post #24
    Gold Member
    AzuiSleet's Avatar
    September 2007
    758 Posts
    Here's a new version with the updated SDK, and a "virtual web browser" for you to play with. You need to update all the dlls from this zip. (and chrome.lua)



    http://azuisleet.gayluadad.net/gmode/gm_chrome_r2.zip

    Edit: I kept uploading the old dll, make sure you get _r2.

  25. Post #25
    DataSchmu's Avatar
    July 2005
    68 Posts
    sorry for the n00bish questions, but:

    Do I need to have the actual google chrome browser installed on my system?

    Do I need anything besides the two awesomium .dlls and the dll from the Release folder?

    what do I do with browserent_shared.lua and chrome.lua?

    How do I open the browser once I'm in game? Is it a console command?

    Are the rest of the files in the zip only for the SDK, and not the end user?
    Reply With Quote Edit / Delete Reply United States Show Events Disagree Disagree x 1 (list)

  26. Post #26
    Sgt Napalm's Avatar
    October 2008
    173 Posts
    Here's a new version with the updated SDK, and a "virtual web browser" for you to play with. You need to update all the dlls from this zip. (and chrome.lua)



    http://azuisleet.gayluadad.net/gmode/gm_chrome_r2.zip

    Edit: I kept uploading the old dll, make sure you get _r2.
    Holy shit.

  27. Post #27
    Gold Member
    peanutzero's Avatar
    August 2006
    114 Posts
    Holy hell, someone please tell me I'm doing something wrong. I copied and modified the browsersent just a little (just to make it easer to spawn and deal with, nothing drastic) and played a youtube video in it. My FPS while turned away from the browser was ~120. Looking at it, I was ~12.

    Then, right after exiting the game and going back to the main menu, Gmod crashed.

    Some more data:
    Looking away from the 2d3d browser in GM_Construct: ~120
    Looking at the 2d3d browser with Azuisleet's test java page: ~100
    google: ~90
    this thread: ~90
    my site: ~90
    youtube: jumps between ~20 and ~60
    watching a youtube video: ~12

    It seems static pages are fine, but video makes you lag like crazy. That and you crash if you disconnect while looking at it.

  28. Post #28
    Riomerc's Avatar
    January 2008
    96 Posts
    Is this just for LUA Devs at this stage, or is there a working part for end users yet?

  29. Post #29
    Gold Member
    AzuiSleet's Avatar
    September 2007
    758 Posts
    Holy hell, someone please tell me I'm doing something wrong. I copied and modified the browsersent just a little (just to make it easer to spawn and deal with, nothing drastic) and played a youtube video in it. My FPS while turned away from the browser was ~120. Looking at it, I was ~12.

    Then, right after exiting the game and going back to the main menu, Gmod crashed.

    Some more data:
    Looking away from the 2d3d browser in GM_Construct: ~120
    Looking at the 2d3d browser with Azuisleet's test java page: ~100
    google: ~90
    this thread: ~90
    my site: ~90
    youtube: jumps between ~20 and ~60
    watching a youtube video: ~12

    It seems static pages are fine, but video makes you lag like crazy. That and you crash if you disconnect while looking at it.
    If you use a large width and height it will eat fps. I would recommend 640x480 at max. There seems to be a crash on vista.

    at 640x480:

  30. Post #30
    I will huff and puff and FLIP YOUR FUCKING TABLES
    Lyokanthrope's Avatar
    October 2005
    7,190 Posts
    Holy hell, someone please tell me I'm doing something wrong. I copied and modified the browsersent just a little (just to make it easer to spawn and deal with, nothing drastic) and played a youtube video in it. My FPS while turned away from the browser was ~120. Looking at it, I was ~12.

    Then, right after exiting the game and going back to the main menu, Gmod crashed.

    Some more data:
    Looking away from the 2d3d browser in GM_Construct: ~120
    Looking at the 2d3d browser with Azuisleet's test java page: ~100
    google: ~90
    this thread: ~90
    my site: ~90
    youtube: jumps between ~20 and ~60
    watching a youtube video: ~12

    It seems static pages are fine, but video makes you lag like crazy. That and you crash if you disconnect while looking at it.
    Ugh, I feel stupid asking this, but how did you get this working? I can't seem to get this to do jack shit.

  31. Post #31
    Gold Member
    confinedUser's Avatar
    October 2008
    3,645 Posts
    Steam Browser doesn't run youtube videos and such ( At least not for me, says I don't have the addon.)
    steam browser lets you use youtube videos
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 7Agree Agree x 2Late Late x 1 (list)

  32. Post #32
    MegaDeath's Avatar
    August 2007
    93 Posts
    How the hell do you run this thing D:
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1 (list)

  33. Post #33
    Gold Member
    peanutzero's Avatar
    August 2006
    114 Posts
    This isn't for the end user. It's for developers.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 2 (list)

  34. Post #34
    DataSchmu's Avatar
    July 2005
    68 Posts
    This isn't for the end user. It's for developers.
    Well that sucks. I'd really love to use this as an alternative to the slow, buggy poor excuse of a browser that the steam browser is. Half the time I open a page in it the entire browser just goes black.

    Okay, let's say I'm a developer, how would I get this to open up in-game so I could test it for something I was developing?
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1Agree Agree x 1 (list)

  35. Post #35
    Unrealomega's Avatar
    January 2009
    262 Posts
    Nice. I really like the look of this.

  36. Post #36
    mbainrot's Avatar
    August 2008
    178 Posts
    Well that sucks. I'd really love to use this as an alternative to the slow, buggy poor excuse of a browser that the steam browser is. Half the time I open a page in it the entire browser just goes black.

    Okay, let's say I'm a developer, how would I get this to open up in-game so I could test it for something I was developing?
    Init the dialog like you would the normal HTML element, read the lua file for different commands

  37. Post #37
    Gold Member
    TestECull's Avatar
    July 2007
    7,037 Posts
    Ahh, cool. Does it lag anywhere near as bad as the overlay browser? If not, I'm installing it in a heartbeat.


    Steam Browser doesn't run youtube videos and such ( At least not for me, says I don't have the addon.)
    Open IE, install the flash player, restart IE and your Steam browser will play youtube videos just fine!

  38. Post #38
    DrDaxxy's Avatar
    October 2007
    491 Posts
    Is it stable as a pure VGUI component?

  39. Post #39
    Grocel's Avatar
    October 2008
    1,249 Posts
    Where does these lua files go?
    chrome.lua
    browserent_shared.lua

  40. Post #40
    Grocel's Avatar
    October 2008
    1,249 Posts
    I want to report a bug:
    Alway when I try to use the gm_chrome.dll module, then I get the error:
    Code:
    error loading module 'chrome' from file 'c:\programme\steam\steamapps\marcel56\garrysmod\garrysmod\lua\includes\modules\gm_chrome.dll':
    	Das angegebene Modul wurde nicht gefunden.
    The sentence
    Code:
    Das angegebene Modul wurde nicht gefunden.
    is a German sentence, because I have a German version of Windows.
    Translated, the sentence means:
    Code:
    The specified module could not be found.
    So, I took a look at the Source Code in the zip. :)
    And have perhaps found an error in it.

    gm_chrome_r2.zip/gm_chrome/gm_chrome.vcproj, Between row 137 to row 150;
    Code:
    			<Tool
    				Name="VCLinkerTool"
    				AdditionalDependencies="tier0.lib tier3.lib Awesomium.lib"
    				OutputFile="D:\Games\Steam\steamapps\azumarril\garrysmod\garrysmod\lua\includes\modules\$(ProjectName).dll"
    				LinkIncremental="1"
    				AdditionalLibraryDirectories="..\chrome\Release"
    				IgnoreAllDefaultLibraries="false"
    				IgnoreDefaultLibraryNames=""
    				GenerateDebugInformation="true"
    				SubSystem="2"
    				OptimizeReferences="2"
    				EnableCOMDATFolding="2"
    				TargetMachine="1"
    			/>
    The row 140 has the mistake. ;)

    Maybe there are more errors, but can't find them.