• GMod - What are you working on? September 2017 (#73)
    263 replies, posted
[QUOTE=NeatNit;52663524]Neato! I recommend doing this in the jeep's [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/ENTITY/RenderOverride]ENT:RenderOverride[/url] rather than PostDrawOpaqueRenderables. The latter is called several times per frame - once in the skybox, one for normal, once for weapon viewmodel, more times if anything in the game calls RenderView, etc - and is called even if the jeep itself is out of view. This means you're running this code probably 3 or more times per frame, with only one of those actually being useful, and even when the player's looking the other way. Also, this is a personal pet peeve of mine and doesn't make any difference, but you should use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/render/PushRenderTarget]render.PushRenderTarget[/url] instead of saving OldRT with Get/SetRenderTarget.[/QUOTE] It's meant to be a generic sort of rendering thing instead of an entity-specific one, but I'll definitely use PushRenderTarget. Since you seem to know about this rendering thing already, do you know why the viewmodel always completely screws up?
[QUOTE=MPan1;52663622]It's meant to be a generic sort of rendering thing instead of an entity-specific one, but I'll definitely use PushRenderTarget. Since you seem to know about this rendering thing already, do you know why the viewmodel always completely screws up?[/QUOTE] Only do your drawing in PostDrawOpaqueRenderables if the first argument is true and the second is false: you rendering while depth isn't being drawn causes the viewmodel to go to the wrong position. The second argument points to if the skybox is being drawn, which you want to only render after that. Using ENT.RenderOverride, instead, will alternatively solve the issue.
:snip: misread
[QUOTE=MPan1;52663653]Is there any way to do it with a hook rather than an entity function though?[/QUOTE] No, it has to be accessible by the entity's __index. It works on engine entity's, though, unlike most entity callbacks.
[QUOTE=code_gs;52663632]Only do your drawing in PostDrawOpaqueRenderables if the first argument is true and the second is false[/QUOTE] Sorry to clog this thread further, but for me, both of these conditions are never met, because depth is always false.
Blur Circle (Stencil) [IMG]http://i.imgur.com/LN5WEID.jpg[/IMG]
Red transparent box (lua) [IMG]https://i.imgur.com/ceuOXfy.jpg[/IMG]
stealing HUD from destiny 2. gotta do last used weapon and then health/armor bar [t]http://zombine.me/ss/hl2_2017-09-09_14-38-10.jpg[/t] ..and then clean up garbage code
Got hired to make a Griffball gamemode: [IMG]https://s26.postimg.org/xipd1vjy1/image.png[/IMG] [video=youtube;prZIp21-avU]http://www.youtube.com/watch?v=prZIp21-avU[/video] [editline]10th September 2017[/editline] [QUOTE=robinkooli;52664992]Red transparent box (lua) [IMG]https://i.imgur.com/ceuOXfy.jpg[/IMG][/QUOTE] Surprising how much progress was made in a few hours
[QUOTE=Pigsy;52665298]Got hired to make a Griffball gamemode: [IMG]https://s26.postimg.org/xipd1vjy1/image.png[/IMG] [video=youtube;prZIp21-avU]http://www.youtube.com/watch?v=prZIp21-avU[/video] [editline]10th September 2017[/editline] Surprising how much progress was made in a few hours[/QUOTE] Pretty nice work Pigsy, I could provide you with spartan animations from Halo CE if you'd like to turn this into something more with OG animations? Would be happy to lend a hand :)
[QUOTE=ThatOneLegGuy;52665359]Pretty nice work Pigsy, I could provide you with spartan animations from Halo CE if you'd like to turn this into something more with OG animations? Would be happy to lend a hand :)[/QUOTE] I personally like the idea, but it's essentially up to the guy I'm making this for. I'll add you on steam and we'll discuss it there, also very much appreciated
so i rotated my HUD (tilt exaggerated for effect) and managed to keep nasty jagged edges away. solution is to render your HUD to a texture and draw it as a rotated rectangle! [t]http://zombine.me/ss/hl2_2017-09-09_21-30-04.jpg[/t]
[QUOTE=Z0mb1n3;52666103][t]http://zombine.me/ss/hl2_2017-09-09_21-30-04.jpg[/t][/QUOTE] Wonky Tape it before it falls off quick
So I've been planning in my head for a open-source configuration library/API thing. Currently every addon ever sports their own config system, either they have convars which are not very user-friendly for addon makers nor server owners. Or they have some lua file but that requires server owners to FTP into their box to edit stuff (and is also very prone to user error). Or they have some data .txt file / database config, which all requires a chunk of code to get working, and doesn't necessarily mean it turns out well in the end. So the idea with this is to have an API which addonmakers hook into, they define early on which variables they use. Defaults, types (number, string, model picker, color picker, sound picker, steamid picker, custom pickers??), categories, etc. Then admins or whatever could open up a menu which would list all available addons and their configs (in some tree list maybe?) and edit whatever they want from inside the server. The system would react to the changes, send out a message (hook) to the addon that something changed and the addon would then be able to react. This would also get stored in a database along with full history (who, when, comment) for every variable. Since it's stored in a database, it'd work seamless with a multi-server setup (the other servers would poll the db at regular intervals for updates). With it being open-source I reckon we can work together to create something very useful, and it's something everybody would see benefit in in the end. What do you guys think?
[QUOTE=Donkie;52666507]With it being open-source I reckon we can work together to create something very useful, and it's something everybody would see benefit in in the end. What do you guys think?[/QUOTE] Great idea, sell it on ScriptFodder for $1000 with a Lua config
[QUOTE=Donkie;52666507]So I've been planning in my head for a open-source configuration library/API thing. Currently every addon ever sports their own config system, either they have convars which are not very user-friendly for addon makers nor server owners. Or they have some lua file but that requires server owners to FTP into their box to edit stuff (and is also very prone to user error). Or they have some data .txt file / database config, which all requires a chunk of code to get working, and doesn't necessarily mean it turns out well in the end. So the idea with this is to have an API which addonmakers hook into, they define early on which variables they use. Defaults, types (would support many different types), categories, etc. Then admins or whatever could open up a menu which would list all available addons and their configs (in some tree list maybe?) and edit whatever they want from inside the server. The system would react to the changes, send out a message (hook) to the addon that something changed and the addon would then be able to react. This would also get stored in a database along with full history (who, when, comment) for every variable. Since it's stored in a database, it'd work seamless with a multi-server setup (the other servers would poll the db at regular intervals for updates). With it being open-source I reckon we can work together to create something very useful, and it's something everybody would see benefit in in the end. What do you guys think?[/QUOTE] It's a nice idea. Nice and standardized environments are still kind of missing in GMod. I think, you would probably like to have other storage options beside databases as well, because not everyone has a database. If you want to have an all in one standardized solution you also have to account for listen server and single player games as well. Addons would have to rely on that API being installed. If they would have to do fallbacks for that missing API, it would scrap the whole point of that system. Shipping it with every addon would be a bad idea as well. Good support for addon dependencies is basically not existing in GMod.
[QUOTE=Grocel;52666739]You would probably like to have other storage options beside databases as well I guess, because not everyone has a database. If you want to have an all in one standardized solution you also have to account for listen server and single player games as well.[/QUOTE] Ah yeah, the storaging would probably be with an interface of sorts, so something like simple textfile based config could probably be implemented as well. [QUOTE=Grocel;52666739]Addons would have to rely on that API being installed. If they would have to check and do fallbacks for that missing API, it would scrap the whole point of that system. Shipping it with every addon would be a bad idea as well.[/QUOTE] Yeah that's the biggest issue I guess. The ultimate goal would for this to be something everyone has already installed. Having to create fallbacks n shit in your code would be devastating. If people know how to install addon X, then they'll also know how to install this config addon. Addon makers would "advertise" in their descriptions that this config addon is required.
-snip- misread
-double snip lol-
I rewrote the [URL="http://wiki.garrysmod.com/page/Render_Order"]Render Order[/URL] wiki page to be more complete and descriptive. I found that a lot of behaviours relating to how convars and rendergroups affected the callbacks were undocumented, so I wanted to make some headway on remedying that. [editline]10th September 2017[/editline] [QUOTE=Donkie;52666507]So I've been planning in my head for a open-source configuration library/API thing. Currently every addon ever sports their own config system, either they have convars which are not very user-friendly for addon makers nor server owners. Or they have some lua file but that requires server owners to FTP into their box to edit stuff (and is also very prone to user error). Or they have some data .txt file / database config, which all requires a chunk of code to get working, and doesn't necessarily mean it turns out well in the end. So the idea with this is to have an API which addonmakers hook into, they define early on which variables they use. Defaults, types (number, string, model picker, color picker, sound picker, steamid picker, custom pickers??), categories, etc. Then admins or whatever could open up a menu which would list all available addons and their configs (in some tree list maybe?) and edit whatever they want from inside the server. The system would react to the changes, send out a message (hook) to the addon that something changed and the addon would then be able to react. This would also get stored in a database along with full history (who, when, comment) for every variable. Since it's stored in a database, it'd work seamless with a multi-server setup (the other servers would poll the db at regular intervals for updates). With it being open-source I reckon we can work together to create something very useful, and it's something everybody would see benefit in in the end. What do you guys think?[/QUOTE] I was going to do something similar for a language system. Currently, the ways of adding translated strings to an addon is pretty varied, and I found a cool way of using function environment to make Lua language files look as simple as: [code]some_phrase = "hi" some_other_phrase = "cool"[/code] Or use string/table logic: [code]-- _G points to the environment table _G["another.one"] = ("Lua"):upper() .. " syntax can be used!"[/code] From there, the keys can be given a prefix by the language loader to make them unique to each addon. My goal was to make this an implementable library/API, so I would love to contribute to your project.
[QUOTE=gonzalolog;52661165]Been working in a Bounty system for Monolith [t]https://i.imgur.com/dNYXomZ.jpg[/t] [t]https://i.imgur.com/4s9LZ6y.png[/t] [vid]https://dl.dropboxusercontent.com/s/2502ao346agkqjr/2017-09-08_15-35-38.mp4[/vid][/QUOTE] Monolith is looking amazing mate it's nice to see someone creating great looking content.
[QUOTE=gonzalolog;52661165]Been working in a Bounty system for Monolith [t]https://i.imgur.com/dNYXomZ.jpg[/t] [t]https://i.imgur.com/4s9LZ6y.png[/t] [vid]https://dl.dropboxusercontent.com/s/2502ao346agkqjr/2017-09-08_15-35-38.mp4[/vid][/QUOTE] How do you made minimap? I'm tried use VMatrix and IMaterial:SetMatrix(), but these doesn't gave any results.
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/surface/DrawTexturedRectRotated]surface.DrawTexturedRectRotated[/url] Check example 1, it will be enough to get an idea about it, i've just used that and scissor rect, everything else it's just magic numbers and trigonometric functions
StormFox Beta is out .. remember there might be bugs! [t]https://i.imgur.com/JWiatZJ.jpg[/t] [url=http://steamcommunity.com/sharedfiles/filedetails/?id=1132466603]Workshop Link[/url] [url=https://facepunch.com/showthread.php?t=1578224&p=52668149]Thread (Bugs, errors, ideas)[/url] [QUOTE=Changelog:] - Moon now supports 2D skyboxes. - Fixed moonglow looking strange in some siturations. - Added some 'darkness' effect on maps withont light_enviroment. - Added lamp-entities; streetlight, parklight and parklight-hanging. - Weather generation is 90% don. - Tweaked the network script and removed unnecessary data-updates. - Fixed a network bug that would desync clients-varables and/or ignore net updates. - Added an entity to display the weekly weather. - Dynamic sun and moon-light. - Snow now drops on the screen like the rain. - Added windsounds and an option to turn them off. - Sunsets/sunrises doing clear weather should cause yellow-ish light. - Fixed the sun a bit.[/QUOTE][t]https://steamuserimages-a.akamaihd.net/ugc/856103815147064955/DDC288550B441586AD75D73D9BBB15A0AEB76D2A/[/t]
[QUOTE=Nak;52667978]StormFox release[/QUOTE] Where's the Patreon link? How am I supposed to give you money.
[QUOTE=Donkie;52666507][words] The system would react to the changes, send out a message (hook) to the addon that something changed and the addon would then be able to react. [words][/QUOTE] I would use this, I'm working on a gamemode where nearly everything has been separated out into addons, and it's kind of a pain to configure things. I would recommend having the addon register a callback with it's settings instead of a using hook though. I don't foresee any cases when anyone else should know about or be able to override _my_ settings being changed.
[QUOTE=Apickx;52669014]I would use this, I'm working on a gamemode where nearly everything has been separated out into addons, and it's kind of a pain to configure things. I would recommend having the addon register a callback with it's settings instead of a using hook though. I don't foresee any cases when anyone else should know about or be able to override _my_ settings being changed.[/QUOTE] Callbacks actually sounds like a better idea. We'll see!
I like the hooks a lot more, if my addon has an integration for yours and i need to fetch some settings of your addon it would be useful to know when the settings have changed as well. Overriding does sound like a bad idea though
I've made my own car dealer because I wanted to save keys to the inventory and whatnot. Mostly a generic car dealer. Therefore I still have to think of more things I could add to flavor vehicles up, but currently I am satisfied with the resulting product. NFS Undeground 2 is the inspiration. [video=youtube;kF7unSlTyvk]https://www.youtube.com/watch?v=kF7unSlTyvk[/video]
Super complex weather / disaster mod in the works by me, business cat and tempest. Here is a demonstration of a blizzard: [video=youtube;axqaNwtrw3U]https://www.youtube.com/watch?v=axqaNwtrw3U[/video]
Sorry, you need to Log In to post a reply to this thread.