• GMod - What are you working on? May 2015 (#45)
    560 replies, posted
[img]http://i.imgur.com/0WkY92Y.png[/img] [B]Highlights from the [URL="http://facepunch.com/showthread.php?t=1458666"]previous thread[/URL][/B] After the drama of last month's thread, I'd like to politely request that everyone keeps on topic. PS, WalkingZombie, please don't post excessive blocks of text which are "feedback". Lurk a bit more before posting as you tend to cause an awful lot of drama here by making [URL="http://facepunch.com/showthread.php?t=1458666&p=47611080&viewfull=1#post47611080"]large[/URL], [URL="http://facepunch.com/showthread.php?t=1458666&p=47608639&viewfull=1#post47608639"]irrelevant[/URL] and [URL="http://facepunch.com/showthread.php?t=1458666&p=47623009&viewfull=1#post47623009"]unnecessary[/URL] posts. WAYWO is not your blog. [QUOTE=baldursgate3 is summoning Lord Gaben;47440588]I believe we've met before, Sir Gabe of Valve. [video=youtube;lNcJdaj69pg]http://www.youtube.com/watch?v=lNcJdaj69pg[/video][/QUOTE] [QUOTE=Nak's admin system;47449600][video=youtube;5KgafnkBOxQ]http://www.youtube.com/watch?v=5KgafnkBOxQ[/video] Inspired by Material Design .. tho need to add more animation to the panels. (Have in mind that the colors and dashboard are placeholders atm) Panels can request data from the server as long as the player got permission to edit/view it. In this case onion scans the given gamemode for ConVars, lists them and users who got premission to edit convars can request the list. The "Loading page" is just a page that requests "dummy"-data from the server that it never receives.[/QUOTE] [QUOTE=baldursgate3's nuke;47459386]Found a way to produce nuclear "flash" lighting effect for GBombs: 5 nuclear bombs... [IMG]http://puu.sh/h1NFe/1ab34669b3.jpg[/IMG][/QUOTE] [QUOTE=|Royal|'s 2D game;47463972][video=youtube;jg39bytrQVc]http://www.youtube.com/watch?v=jg39bytrQVc[/video][/QUOTE] [QUOTE=Giraffen93's posters;47468738][t]http://rp.braxnet.org/scr/rp_newcity0016.jpg[/t] posterzzzz for even quicker uploading, it loads from pomf on imgur you can put jpg on a gif etc and it works so fuck that[/QUOTE] [QUOTE=Wyozi's radio;47470979]Putting submaterials to good use. [vid]http://a.pomf.se/pfoghm.webm[/vid][/QUOTE] [QUOTE=Melted Bu11et's pathfinding;47475259][video=youtube;-rkUaoB1zvk]http://www.youtube.com/watch?v=-rkUaoB1zvk&feature=youtu.be[/video] -snipped text-[/QUOTE] [QUOTE=highvoltage's jump pad;47513917]Finally decided to work on releasing my jumppad and made a tool for it, its pretty much the same as when I've posted it before except that with the tool you can change its model, launch sound, landing spot and enable/disable it with a key. Should I add wire support for the hell of it? Also debating on allowing it to trigger a key on launch like a button. [vid]http://puu.sh/hbxQy/d7b1875797.webm[/vid] [t]http://puu.sh/hbBWg/5220dad93f.jpg[/t][img]http://puu.sh/hbBTc/b8d93d1139.jpg[/img] Can't find anymore fitting models/sounds to use either I should hopefully have it on the workshop by tomorrow to temporally satisfy the people that bug me about my UT2K4 stuff[/QUOTE] [QUOTE=baldursgate3's fireworks;47514804]accidently ran into my firework... but here's my battery concept. All I have to do is create more less expensive particles to match "cold war" theme :zoid: [video=youtube;ko3A9VjjB8w]http://www.youtube.com/watch?v=ko3A9VjjB8w[/video][/QUOTE] [QUOTE=Killstr3aKs' ships;47551504]This time around i'm working on floating things instead of flying things :dance:. And yes, once again we are following the "Shoebox Mantra" for Micronaval making the models at a 1/16 scale. the HMS King George V. Pretty good model i found on Ze Interwebs which has some 116k vertices :v: Still, i managed to compile it and add it to Micronaval. It has 10 14-inch guns on 2 quad turrets + 1 double turret, 16 5.25-inch guns on 8 double turrets, 2 40mm Bofors AA cannons and 11 20mm Oerlikon AA cannons, all of them fully controllable. [t]http://puu.sh/hic0Z/99ceff957b.jpg[/t][T]http://puu.sh/hicIq/29d9367dfe.jpg[/T] [T]http://puu.sh/hicVL/1f9eeb557b.jpg[/T][T]http://puu.sh/hicZr/7773128b87.jpg[/T] And the Clemson class destroyer, this one has around 90k vertices so it's still pretty detailed. It has 4 4-inch guns and 12 21-inch torpedo tubes mounted on 4 turrets on the stern. [T]http://puu.sh/hidmQ/bdc6aa544e.jpg[/T][T]http://puu.sh/hidAm/84249c7e04.jpg[/T] [T]http://puu.sh/hidEK/ec7fda73f0.jpg[/T][T]http://puu.sh/hidHG/5002071f54.jpg[/T][/QUOTE] [QUOTE=Giraffen93's false walls;47572931][media]http://www.youtube.com/watch?v=sOWvJDfofig[/media] taking furnishing to a whole new level[/QUOTE] [QUOTE=Fortune11709's gamemode;47586610][B]Finally get to show off my gamemode.[/B] I've always been a really big fan of The Hidden. It was an awesome game and I was really quite sad that it had pretty much died (at least here in Australia). So, I decided it take it upon myself to make a recreation of the game inside of Garrys Mod. If you don't know what The Hidden is, you can read about it [URL="http://www.hidden-source.com/"]here[/URL]. I'm aware there is already a Hidden inspired gamemode in Garrys Mod called "The Stalker", but I wanted to create my own version that was closer to the original mod. It's obviously not 100% true to the original game, with some stuff being left out and new features added, but the core idea is the same. I'm not done yet, but when I do finish, I'm going to be releasing it for [B]free.[/B] [B]Sorry about the music in the videos, I had it playing in the background and it picked it up :V[/B] [video=youtube;SYHvb7zeR1g]http://www.youtube.com/watch?v=SYHvb7zeR1g[/video] I tried to keep the movement of the hidden as nice as possible. In this video you can see some of the mechanics of the Hidden. [video=youtube;utwqCExVAZI]http://www.youtube.com/watch?v=utwqCExVAZI[/video] This is something unique to the recreation - custom mode. If this mode is enabled, the Hidden can choose their stats at the start of the round. These stats influence everything from hp, stamina, speed to damage reduction and stamina recharge time. [video=youtube;KvelJdlaHG0]http://www.youtube.com/watch?v=KvelJdlaHG0[/video] This shows the "Hidden Vision", which allows the Hidden to see through walls. I wanted it to be easily customizable for those who don't know lua, so I've been making sure to add config options for just about everything. [url]http://i.imgur.com/p7qHYMf.png[/url] [url]http://i.imgur.com/inriK3J.png[/url] For those who do know lua, I will be making it dev friendly. It's going to have plenty of hooks so you wont need to modify core content too much. Now that I'm done announcing it, I'd like some opinions on some stuff: This is the humans loadout menu, where they can select their weapon, equipment, etc. What do you think? [img]http://i.imgur.com/pDxYz1k.png[/img] This is the scoreboard, I can't decide if I like this design or not. [url]http://imgur.com/G4CfhvF[/url] There's lots of little things that you can't see in these examples, such as sounds and little visuals etc, but they're there. I've got a few more core features to get done, then I can get to work polishing it off. Oh, and it hasn't got a name yet. Let me know what you think :D[/QUOTE] [QUOTE=_Divine's report system UI;47608821]A simple report management system. Focus was primarily network optimization & GUI design. [video=youtube;xC7JRRd3ZgI]http://www.youtube.com/watch?v=xC7JRRd3ZgI&feature=youtu.be[/video] [IMG]http://cdn.auroraen.com/image/3u2i3v221R12/lel.jpg[/IMG][/QUOTE] [QUOTE=failcake's event;47619212]So uhm i was bored... and decided to create an event on meta [video=youtube;NbW33qXeF7Q]http://www.youtube.com/watch?v=NbW33qXeF7Q[/video] Runs on all clients, but currently i was only running it on me. The server sends a list of OGGs links on the web and the client silently loads them, after its done, i can play them instantly :3[/QUOTE] [QUOTE=_FR_Starfox64's trading cards;47619361]Some very early work in progress... [t]http://images.akamai.steamusercontent.com/ugc/718665440854753271/5750DAD85DD4FED6
First time in the highlights! Yay!
3 highlights, been a productive month :v: i really don't think the public servers are far from now, just gotta get some stress testing & stability working
[QUOTE=Giraffen93;47634109]3 highlights, been a productive month :v: i really don't think the public servers are far from now, just gotta get some stress testing & stability working[/QUOTE] And do everything you can to remove the frame-drops whenever not standing completely still, even with a pretty juicy rig.
Fuck yes, finally made it to the highlights with my pathfinder. I haven't really worked on anything Gmod related, but I've had some ideas from the Btooom! manga, thanks to the guy that posted that. There is a ton of cool shit you can replicate from there.
[t]http://images.akamai.steamusercontent.com/ugc/45377511642716162/35AFB61AB351E6CEF9F61833C17C042ABB004920/[/t] Made a dynamic tower-menu ... thingy. [Edit] [media]http://www.youtube.com/watch?v=budXzDymiJs[/media] Some tower AI and tower select .. thingy. Still placeholders. [Edit edit] (Nearly forgot) It needs optimization, but made [url=https://dl.dropboxusercontent.com/u/14214411/pics/NETHook.png]net-hooks[/url] for the gamemode. Easy networking with: NW.HookAdd(name,func) and NW.HookCall(name,[<serverside>:ply or broadcast,] ...). The first argument with NW.HookCall on the server, is the player who called it.
Missed the highlights twice in a row... Gotta step up my game! Brb making FNAF gamemode
-- removed
[QUOTE=Nak;47634408]-td stuff-[/QUOTE] I have a really strong urge to go make a TD gamemode myself now, this looks REALLY fun to develop!
I didn't get to see that, why would you remove it! :-(
I made the highlights! Here is some very recent progress to celebrate: [vid]http://puu.sh/hwRSF/c5a2763c20.webm[/vid] Finally figured out the math after CmdrMatthew explained what it all meant and a whole lot of trial and error and stupid mistakes. Now off to make it look pretty. Do you guys like how the target indicator looks? [editline]30th April 2015[/editline] Here is the download for those who want: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=431422041&tscn=1430411397[/url]
You get to endure even more of my shit-tier chatbox replacement. [video=youtube;XQB3YKOj0Z4]http://www.youtube.com/watch?v=XQB3YKOj0Z4[/video] I do have it fading out as well, but for some reason forgot to actually record that happening. I intend for a ton of the things this does to be customisable, I just need to extend the settings panel a bit more. But this is tonights work at least. I think I'll stick with this style, it's grown on me a lot.
it's i think because of your detection for urls. things like "hey man.what are you doing" could be interpreted as "hey [url]http://man.what/[/url] are you doing" maybe check for the common tlds like .de, .com, .fr and so on.
[QUOTE=Tomelyr;47635980]it's i think because of your detection for urls. things like "hey man.what are you doing" could be interpreted as "hey [url]http://man.what/[/url] are you doing" maybe check for the common tlds like .de, .com, .fr and so on.[/QUOTE] Yeah, I was trying to avoid needing something like that. But pattern matching is only going to go so far. Time to hunt down a table of TLDs.
[url]https://publicsuffix.org/list/effective_tld_names.dat[/url] edit:// or [url]http://data.iana.org/TLD/tlds-alpha-by-domain.txt[/url] which only include the ending. things like .co.uk isn't there, but .uk
I am currently working on an addon, its like the game cookie clicker or adventure capitalist, its going to be my first addon, and once im finnish I will release it to the public, its only in its begining stages; there are going to be alot more added to it, example, price tabe, acheivements... [IMG]http://images.akamai.steamusercontent.com/ugc/720917455738462864/0C8E772FA35E773E75882536A28EA4CF585F4D0F/1024x575.resizedimage[/IMG]
[QUOTE=hexpunK;47635951]You get to endure even more of my shit-tier chatbox replacement. [video=youtube;XQB3YKOj0Z4]http://www.youtube.com/watch?v=XQB3YKOj0Z4[/video] I do have it fading out as well, but for some reason forgot to actually record that happening. I intend for a ton of the things this does to be customisable, I just need to extend the settings panel a bit more. But this is tonights work at least. I think I'll stick with this style, it's grown on me a lot.[/QUOTE] Why don't you just make it size-able and move-able using the mouse? Hover a corner and drag to size and move? I never got why people put those settings in a menu with a slider.
[QUOTE=ChewGum;47637310]Why don't you just make it size-able and move-able using the mouse? Hover a corner and drag to size and move? I never got why people put those settings in a menu with a slider.[/QUOTE] Sheer retardation is the reason. I almost totally forgot that would be possible. Just need to set up a nicer way to draw the frame when the user is moving it around, but that sounds like a much better way to handle it.
[img]http://i.imgur.com/jwudy7G.jpg[/img] Saw someone asking for a way to draw lighting, so I made a script to draw a very simple lighting. [code] local ent = Entity(184) //LocalPlayer() local start = ent:GetPos() local endpos = self:GetPos() local deviations = 10 local power = 3 -- (2 ^ power) segments local m = Material( "cable/physbeam" ) render.SetMaterial( m ) local segments = { { start, endpos } } for i=0, power do local newsegs = {} for id, seg in pairs( segments ) do local mid = Vector( (seg[1].x + seg[2].x) / 2, (seg[1].y + seg[2].y) / 2, (seg[1].z + seg[2].z) / 2 ) local right = (start - endpos):Angle():Right() local up = (start - endpos):Angle():Up() local offsetpos = mid + right * math.random( -deviations, deviations ) + up * math.random( -deviations, deviations ) table.insert( newsegs, {seg[1], offsetpos} ) table.insert( newsegs, {offsetpos, seg[2]} ) end segments = newsegs end for id, seg in pairs( segments ) do render.DrawBeam( seg[1], seg[2], 5, 0, seg[1]:Distance(seg[2]) / 25, Color( 255, 255, 255 ) ) end [/code]
[QUOTE=Robotboy655;47639893][img]http://i.imgur.com/jwudy7G.jpg[/img] Saw someone asking for a way to draw lighting, so I made a script to draw a very simple lighting.[/QUOTE] Reminded me of a weapon I started a long time ago that shot lighting bolts from a small storm cloud overhead (never did the cloud) It might be loud for headphone users [vid]http://puu.sh/hy5lo/6eaee87a5e.webm[/vid]
Was bored the other day so... [video=youtube;X2pvzI6iFaw]http://www.youtube.com/watch?v=X2pvzI6iFaw&feature=youtu.be[/video] Dumb, I know. c: [B]Edit:[/B] Sorry about the music btw & being lazy and using GFirework particles/sounds lol
[QUOTE=hexpunK;47635993]Yeah, I was trying to avoid needing something like that. But pattern matching is only going to go so far. Time to hunt down a table of TLDs.[/QUOTE] Forget Top level domains. Heres what I do and use. [code] function string.HasURL( str ) return tobool(str:find("https?://[%w-_%.%?%.:/%+=&]+")) end function string.ParseURL( str ) local url, spos, epos = "", str:find("https?://[%w-_%.%?%.:/%+=&]+") for i=1, str:len() do if i >= spos and i <= epos then url = url .. string.GetChar(str, i) if url:len() > (epos - spos) then str = url end end end return str end [/code]
[QUOTE=Robotboy655;47639893][img]http://i.imgur.com/jwudy7G.jpg[/img] Saw someone asking for a way to draw lighting, so I made a script to draw a very simple lighting. [code] local ent = Entity(184) //LocalPlayer() local start = ent:GetPos() local endpos = self:GetPos() local deviations = 10 local power = 3 -- (2 ^ power) segments local m = Material( "cable/physbeam" ) render.SetMaterial( m ) local segments = { { start, endpos } } for i=0, power do local newsegs = {} for id, seg in pairs( segments ) do local mid = Vector( (seg[1].x + seg[2].x) / 2, (seg[1].y + seg[2].y) / 2, (seg[1].z + seg[2].z) / 2 ) local right = (start - endpos):Angle():Right() local up = (start - endpos):Angle():Up() local offsetpos = mid + right * math.random( -deviations, deviations ) + up * math.random( -deviations, deviations ) table.insert( newsegs, {seg[1], offsetpos} ) table.insert( newsegs, {offsetpos, seg[2]} ) end segments = newsegs end for id, seg in pairs( segments ) do render.DrawBeam( seg[1], seg[2], 5, 0, seg[1]:Distance(seg[2]) / 25, Color( 255, 255, 255 ) ) end [/code][/QUOTE] I made Count Dooku hands in like 30 seconds, they are magnificent. [code] function SWEP:PrimaryAttack() if CLIENT then hook.Add( "PostDrawOpaqueRenderables", "tstasdfasdfad", function() local m = Material( "cable/physbeam" ) render.SetMaterial( m ) local pos = LocalPlayer():GetShootPos() - Vector( 0, 0, 20 ) local endPos = pos + (LocalPlayer():GetForward() * 100) drawLightning( pos, endPos, 10, 3 ) end) end end function SWEP:SecondaryAttack() if CLIENT then hook.Remove( "PostDrawOpaqueRenderables", "tstasdfasdfad") end end -- ROBOTBOYYYYYY function drawLightning( start, endpos, deviations, power ) local segments = { { start, endpos } } for i=0, power do local newsegs = {} for id, seg in pairs( segments ) do local mid = Vector( (seg[1].x + seg[2].x) / 2, (seg[1].y + seg[2].y) / 2, (seg[1].z + seg[2].z) / 2 ) local right = (start - endpos):Angle():Right() local up = (start - endpos):Angle():Up() local offsetpos = mid + right * math.random( -deviations, deviations ) + up * math.random( -deviations, deviations ) table.insert( newsegs, {seg[1], offsetpos} ) table.insert( newsegs, {offsetpos, seg[2]} ) end segments = newsegs end for id, seg in pairs( segments ) do render.DrawBeam( seg[1], seg[2], 5, 0, seg[1]:Distance(seg[2]) / 25, Color( 255, 255, 255 ) ) end end function SWEP:PreDrawViewModel( vm, ply, wep ) vm:SetMaterial( "engine/occlusionproxy" ) end function SWEP:PostDrawViewModel( vm, ply, wep ) vm:SetMaterial() end [/code]
Holy shit its working: [vid]http://puu.sh/hyaGM/61872ebff2.webm[/vid] How I'm detecting when to draw it feels hacky as hell..
[QUOTE=highvoltage;47642123]Holy shit its working: [vid]http://puu.sh/hyaGM/61872ebff2.webm[/vid] How I'm detecting when to draw it feels hacky as hell..[/QUOTE] Don't think of it as hacky, think of it as "Completely out of the box thinking".....
[QUOTE=TheMrFailz;47642453]Don't think of it as hacky, think of it as "Completely out of the box thinking".....[/QUOTE] I agree, it looks great and if it worked, that means you're doing something right!
[QUOTE=Aide;47641947]Forget Top level domains. Heres what I do and use. [code] function string.HasURL( str ) return tobool(str:find("https?://[%w-_%.%?%.:/%+=&]+")) end [/code][/QUOTE] That works significantly better than anything else I've tried. Why does Lua have to use its own pattern matching language, I could totally have worked this out myself if it was regex. Thanks! Assuming you're cool with me using it that is. I've also finally stopped using the shit tier controls for size and position adjustment because that was kinda silly I'll freely admit. So now I have URL handling, timestamping, size, colours, fading out (optional), and a decently sized chat log. What else would people even want in a chat box? I'm avoiding server-side stuff as much as possible.
[QUOTE=hexpunK;47642782]Why does Lua have to use its own pattern matching language, I could totally have worked this out myself if it was regex.[/QUOTE] You can convert most simple regexes by just replacing \ with %. Most of lua's switches use same logic as regex, but lua's patterns is less powerful.
[QUOTE=hexpunK;47642782]That works significantly better than anything else I've tried. Why does Lua have to use its own pattern matching language, I could totally have worked this out myself if it was regex.[/QUOTE] Because regex is huge and Lua is meant to be tiny: [quote="Programming in Lua 20.1"]Unlike several other scripting languages, Lua does not use POSIX regular expressions (regexp) for pattern matching. The main reason for this is size: A typical implementation of POSIX regexp takes more than 4,000 lines of code. This is bigger than all Lua standard libraries together. In comparison, the implementation of pattern matching in Lua has less than 500 lines. Of course, the pattern matching in Lua cannot do all that a full POSIX implementation does.[/quote] Plenty of people have made regex ports, though
[QUOTE=Luni;47643418]Because regex is huge and Lua is meant to be tiny: Plenty of people have made regex ports, though[/QUOTE] Have some information on why regex is huge: Despite what the name might have you believe, POSIX regular expressions is not (just) a means of parsing regular languages. It [url=https://nikic.github.io/2012/06/15/The-true-power-of-regular-expressions.html]can parse[/url] some context-free and even context-sensitive languages (see the Chomsky hierarchy in the link). The thing is, regular languages are the easiest to parse and require little effort. Regular language parsing can always be done in O(n) time. This gets more difficult in context-free languages, for which algorithms exist that have a [url=http://en.wikipedia.org/wiki/CYK_algorithm]cubic[/url] worst case running time. Most programming languages are context-free. Don't be frightened by the cubic running time, with most grammars the running time is linear, as is the case with regular languages. Context-sensitive languages are even harder to parse, they're hard as [I]balls.[/I] I don't know what the worst case running time for them is, but it's probably in a similar, though slightly worse situation than context free grammars. In the end, POSIX regex has features that go as far as making you able to parse some context-free and context-sensitive languages. Think of features like lookahead, look behind, greedy parsing and most of the other [url=http://www.regular-expressions.info/refadv.html]fancy shit this page mentions[/url]. tldr: POSIX regex is really powerful and allows you to parse things that are truly impossible in Lua's pattern matcher. That can really limit you in what you can do with Lua by default. On the other hand we have to acknowledge that regex' features are more complicated than the wrinkle patterns on the average old man's balls and that they indeed require quite a few more lines of code to implement.
Sorry, you need to Log In to post a reply to this thread.