• GMod - What are you working on? February 2015 (#42)
    807 replies, posted
-Snip-
It's finished! It is done! It now supports youtube, webm, and gifv! (gifv is imgur's shitty webm rename) All muted. Here's an upsized youtube one to show off the map conforming: [t]http://foxcock.me/web/images/zscreen/2015_02/Screenshot-2015-02-17_00.27.57.png[/t] [editline]17th February 2015[/editline] releasing on workshop as soon as i figure out how to release it on workshop :v:
[QUOTE=awcmon;47149900]Haven't touched GMod for a while, but a friend's server is running a painfully outdated version of one of my old weapon bases, so I made a new weapon base. Still a WIP. [video=youtube;wqRfoJVgObc]http://www.youtube.com/watch?v=wqRfoJVgObc[/video] my computer is from 2007 please don't judge video quality Reloads are like in CS:GO. Once you put the mag in, the weapon's kinda reloaded. I included weapon inspection, like in CS:GO, since some models are really great and many times we don't see enough of them to fully appreciate the work done in modeling/texturing it. Plus, a friend of mine made a CS:GO like skin system that works well with it. Plus guns look pretty cool. In general, the animations are pretty smooth. I had shooting instantly boot you out of inspection without smoothing since it looks awkward otherwise. The weapons also work pretty well under lag. A few times I was lag-testing with friends and we forgot we were lagging. I used net_fakelag 400 and stuff though, so I guess it might be a bit different than real lag. Idk, there's a bunch of stuff. I guess this weapon base was pretty inspired from CS:GO now that I look at it.[/QUOTE] i literally felt shocks run through my body from how loud that was
[t]http://cloud-4.steamusercontent.com/ugc/28482212351203570/A94848F6701E31C95D46E55329927C4CE39BA204/[/t] [url=http://facepunch.com/showthread.php?t=1451605&p=47156142#post47156142]Release thread[/url]
[IMG]http://i.imgur.com/apPLO61.gif[/IMG]
I have a fobia of fungi. That scared the crap out of me.
[QUOTE=antid2;47148687]working on a mail system, just working on the vgui at the moment, haven't touched anything server side yet just started a little bit ago [img]http://i.imgur.com/DVygAoP.jpg[/img][/QUOTE] How are you centering the text so perfectly in those dlabels if I may ask?
[QUOTE=Pantho;47157343]How are you centering the text so perfectly in those dlabels if I may ask?[/QUOTE] Probably not using DLabels at all, could be overriding the panel's Paint functions, and using [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/draw/SimpleText"]draw.SimpleText[/URL]
[QUOTE=Phoenixf129;47157524]Probably not using DLabels at all, could be overriding the panel's Paint functions, and using [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/draw/SimpleText"]draw.SimpleText[/URL][/QUOTE] <snip> Got it, text_enums thanks.
[url]http://wiki.garrysmod.com/page/Panel/GetTextSize[/url] [url]http://wiki.garrysmod.com/page/surface/GetTextSize[/url]
[QUOTE=Pantho;47157343]How are you centering the text so perfectly in those dlabels if I may ask?[/QUOTE] You can use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Panel/SetContentAlignment]DLabel:SetContentAlignment[/url]( 5 ) to align the text to the center, the base [URL="https://github.com/garrynewman/garrysmod/blob/7e739582bbaace7f2b95aeea549ced108cd0b104/garrysmod/gamemodes/base/gamemode/cl_scoreboard.lua#L46"]scoreboard[/URL] makes use of this.
Although I can now do it in a DLabel easy enough, draw.SimpleText would be better for what I was doing anyway, but it's behaving a bit oddly. When I set the text_enum to 1 it pushes the text the opposite way instead of centering. Top image is with 0,0 enum, bottom is 1,0 [IMG]http://i.imgur.com/CxprWzw.jpg[/IMG] -edit draw.SimpleText("Test Text","SideMenu",CLMB.Panel:GetWide()/2,CLMB.Panel:GetTall()/2,Color(255,255,255,255),1,1) Worked great, much love <3
The origin of the text will be the center, so that's probably why you're only seeing Text. Get the width of the box parent, and divide it by 2 on Test Text's X position. [B]Edited[/B] No problem, nice to see that did the trick.
[QUOTE=LegoGuy;47154000]I really think you should host these on your own server and then stare at the HTTP logs to see if anyone actually reads your shit. thx automerge[/QUOTE] Some of his shit is actually helpful to me tho Ur making me sad ;_;
[QUOTE=Pantho;47157343]How are you centering the text so perfectly in those dlabels if I may ask?[/QUOTE] btn = vgui.Create("DButton yada yada btn:SetText("Inbox") dbutton auto centers text i didn't do anything special :P
[t]http://i.imgur.com/JMDNowZ.jpg[/t] It works! [t]http://i.imgur.com/wfMFmIZ.jpg[/t] She works!
Alyx looks really fat in that picture for some reason. Also, what works?
Subtitles? Or whatever it was No, can't be that. Two seats in the Jeep? No wait, weapons in the car!
[t]http://i.imgur.com/HJtNiTT.jpg[/t] It detects! The jalopy radar was always broken in GMod, and so was Alyx not being able to get in the car.
[QUOTE=Robotboy655;47159268][t]http://i.imgur.com/HJtNiTT.jpg[/t] It detects! The jalopy radar was always broken in GMod, and so was Alyx not being able to get in the car.[/QUOTE] Wait, are you telling me Alyx didn't want to get in the car when I used the console command on her just because the damn radar doesn't work? Fucking source engine.
I am quite sure they were two different issues. Doubt a broken radar would effect Alyx not being able to get in a car.
I'm not math; tried making this thing. Some kind of regular polygon mathgic happened when I set sides to: 4000 [t]http://i.imgur.com/YwZBnow.jpg[/t] 16000 [t]http://i.imgur.com/Jv0a8js.jpg[/t] [lua] local function drawrpoly(x, y, radius, sides, colors) colors = IsColor(colors) and {colors} or colors local colamt = #colors local coli = 0 local centerpoint = {x = x, y = y} for i = 0, sides - 1 do -- Don't go above 64 on sides coli = coli + 1 if coli > colamt then coli = 1 end surface.SetDrawColor(colors[coli]) local polygon = { -- So many tables {x = radius * math.cos(2*math.pi*i/sides) + x, y = radius * math.sin(2*math.pi*i/sides) + y}, {x = radius * math.cos(2*math.pi*(i+1)/sides) + x, y = radius * math.sin(2*math.pi*(i+1)/sides) + y}, centerpoint, } surface.DrawPoly(polygon) end end hook.Add("HUDPaint", "SomeKindOfPoly", function() drawrpoly(300, 300, 256, 16, {color_white, color_black}) end) [/lua] I had a third color in when I took that screenshot.
[QUOTE=zerf;47160735]I'm not math; (sparkly looking circles and code to make it)[/lua] I had a third color in when I took that screenshot.[/QUOTE] I am math. I actually am. I am the mere concept of math. I think I know what might cause this problem. [URL="http://wiki.garrysmod.com/page/surface/DrawPoly"]It's always good to do some research.[/URL] The maximum supported number of vertices for surface.DrawPoly is 256 That would mean 256 sides, vertex 256 linking with vertex 1 to make the 256th side. If you don't want that to happen with your circles, try not to exceed the number so much. [editline]Hold on just a second...[/editline] Wait I reread your code a little... instead I think it might be being caused by how small the numbers get. I don't know how to describe why that effect happens, but that might make sense when you have thousands of sides with less than a 1 pixel radius.
[QUOTE=zerf;47160735]I'm not math; tried making this thing. Some kind of regular polygon mathgic happened when I set sides to: 4000 [t]http://i.imgur.com/YwZBnow.jpg[/t] 16000 [t]http://i.imgur.com/Jv0a8js.jpg[/t] [lua] local function drawrpoly(x, y, radius, sides, colors) colors = IsColor(colors) and {colors} or colors local colamt = #colors local coli = 0 local centerpoint = {x = x, y = y} for i = 0, sides - 1 do -- Don't go above 64 on sides coli = coli + 1 if coli > colamt then coli = 1 end surface.SetDrawColor(colors[coli]) local polygon = { -- So many tables {x = radius * math.cos(2*math.pi*i/sides) + x, y = radius * math.sin(2*math.pi*i/sides) + y}, {x = radius * math.cos(2*math.pi*(i+1)/sides) + x, y = radius * math.sin(2*math.pi*(i+1)/sides) + y}, centerpoint, } surface.DrawPoly(polygon) end end hook.Add("HUDPaint", "SomeKindOfPoly", function() drawrpoly(300, 300, 256, 16, {color_white, color_black}) end) [/lua] I had a third color in when I took that screenshot.[/QUOTE] What. The fuck. Care to evaluate your pictures? I am confused on how that code produced that result. EDIT: Or are you as confused as I am?
[QUOTE=bobbleheadbob;47160851]What. The fuck. Care to evaluate your pictures? I am confused on how that code produced that result.[/QUOTE] After I read the code again, I'm pretty sure I know why... each side is created with 1 polygon, 3 vertices. When the side count is so massive, those polygons become EXTREMELY skinny. This little visual glitch happens in other situations too, I'm thinking right now of when very detailed textures are viewed from a far distance at a steep perpendicular angle. At least I think that's when it happens usually... maybe it was a different kind of situation, but it has to do with anisotropic filtering
[QUOTE=WalkingZombie;47160870]After I read the code again, I'm pretty sure I know why... each side is created with 1 polygon, 3 vertices. When the side count is so massive, those polygons become EXTREMELY skinny. This little visual glitch happens in other situations too, I'm thinking right now of when very detailed textures are viewed from a far distance at a steep perpendicular angle. At least I think that's when it happens usually... maybe it was a different kind of situation, but it has to do with anisotropic filtering[/QUOTE] Ah. It needs mipmapping.
I think 360 or 720 sides would be plenty for fantastic detail; I don't know how great that would look in very low resolutions, though... [editline]17th February 2015[/editline] I think this question should really be asked in [URL="http://facepunch.com/showthread.php?t=1411111&page=104"]this thread[/URL], bobblehead [editline]17th February 2015[/editline] So I'm still working on that weapons base I mentioned more than a month ago, maybe even two... I don't keep track of time... anyway, I created a 20 minute video that shows a lil of it, one application I've used for it so far, I guess... me firing onslaughts of bullets at mossman's body (you can skip from about 10:30 to 12:30 if you don't wanna watch that, an annotation should pop up asking you), and some of my older work from quite a few months past; a crowbar, stunstick, medkit, and two grenades. I would love if you would watch all of it, you could still skip by clicking the annotation tho. [video=youtube;KLUIFTmb54Y]http://www.youtube.com/watch?v=KLUIFTmb54Y[/video]
I'm surprised how many english errors I made :pwn: I forgot to demonstrate what it does when you're too close to a wall, how you pull the weapon back; I don't think I showed sprinting for all weapons, and I know I didn't show the ironsights offset for when you crouch AND walk at the same time (CTRL + ALT default) [editline]17th February 2015[/editline] damn you auto merge
[QUOTE=Author.;47159135]Subtitles? Or whatever it was No, can't be that. Two seats in the Jeep? No wait, weapons in the car![/QUOTE] Nah, two seats in a jeep. Weapons in a vehicle have been a thing since an update some time ago: [video=youtube;pK2VrLRxr8Y]http://www.youtube.com/watch?v=pK2VrLRxr8Y[/video] By default though they stil act weird. I had to do some hacky shit to make it work properly.
Area on the top seems somewhat bad. [img_thumb]http://puu.sh/g1lCg/e6e0b3dcc8.png[/img_thumb] Also, I love how you can softcode your things, so adding tabs is as simple as: [code]tabs[ 4 ] = { name = "Ping", fetch = function( ply ) return ply:Ping() end }[/code]
Sorry, you need to Log In to post a reply to this thread.