• GMod - What are you working on? May 2017 (#69)
    296 replies, posted
Been working on a stock system (with a few extra concepts) over the last few months. [URL="https://facepunch.com/showthread.php?t=1529285&p=50916903&viewfull=1#post50916903"]I originally posted a really really early draft of it a few WAYWO's ago[/URL] and thought id share the progress as its pretty much at completion (still got some finishing touches to do on the dermas). A brief little video of it which I threw together [video=youtube;kT_pISXzpk4]https://www.youtube.com/watch?v=kT_pISXzpk4&feature=youtu.be[/video] Looks a bit odd in the video but every market essentially has 5 layers of events(where it either goes up or down), and you can see they one of the events are all currently synced on every market so you can see they all either have a massive spike or dip at the same second, which won't be like that forever if you were wondering :p Its one of those addons where A LOT of work is done behind the panels (and ive also only shown half the addon, it also has investment groups and news systems(which trigger big stock events) which was all interestingly based off a TV show I've been watching [URL="http://www.sho.com/billions"]Billions[/URL]). If all the things what was the absolute hardest to do was to get that damn graph to automatically scale itself so the entire thing is always visible no matter the values. That literally took me weeks and put the project on hold for a month. I fed it some stupid numbers so I could show how it reacts to massive changes and here are the changes (I do plan to make it smoother one day...): [IMG]https://i.gyazo.com/8a51a7c763ef9f133362f73b4f0c7bdc.gif[/IMG] Also what I was doing when making the addon is keeping in mind I don't want to be sending a number every second 12 times to every players, so I put together a nice little system so it only sends the data of the market if you are looking at its graph - and when you exit the panel it stops sending you data, extremely simple but was quite happy on how it turned out. It was pretty fun making though as its something I had always wanted to do and im actually really really really proud of it. Its been running on my server and has gotten a really positive reaction adding the new dynamic of this different and deeper economy which was also great to see.
[QUOTE=VeXan;52195761]When do you think this will be released to the public? I'd gladly host this![/QUOTE] I hope to finish it next week or maybe in 2 depending on what else i want to add. Any suggestions?
[t]http://i.imgur.com/fWjEuKA.jpg[/t] [video=youtube;F3CIZ1GqDYQ]https://www.youtube.com/watch?v=F3CIZ1GqDYQ[/video]
The grass is sucked to hell where it belongs
[QUOTE=Instant Mix;52195265]If you still have the resources and you wouldn't mind, that would be massively appreciated if I could have a gander at it! By the looks of it, it appears that method is how most modern lighting visualisers work.[/QUOTE] Will do, I'll post/PM it soon, hopefully you'll find it useful
So does the grass eventually come back from hell and give you more money?
Meanwhile in hell [video=youtube;viyIA7-vCBk]https://www.youtube.com/watch?v=viyIA7-vCBk[/video]
Where's the grass I thought it went there
[vid]https://my.mixtape.moe/tzyywc.webm[/vid] Currently designing some fun and intuitive movement mechanics for an eventual PvP gamemode I'd like to make. The goal is to make something as crazy and hectic as possible, while still being incredibly skillful and fun. My current list of mechanics: Wall jump Double jump Long jump Duck tap Crouch slide I also have a jetpack, but I didn't use it in this video demonstration, and I'm still on the fringe on whether or not I want to include it.
Nothing pretty, but it's still neat. [quote][vid]http://zombine.me/file/Half%20Life%20%20Source%2005.08.2017%20-%2021.22.17.03.mp4[/vid][/quote] I worked out the frustum calculations and such for the player's view, and applied it to 3d2d. I will be using this to eventually maybe make some UI :)
[QUOTE=Darkomni;52204193]I also have a jetpack, but I didn't use it in this video demonstration, and I'm still on the fringe on whether or not I want to include it.[/QUOTE] Including a jetpack or any implementation of it would likely blur the importance of the already good movement mechanics [editline]9th May 2017[/editline] [QUOTE=Z0mb1n3;52204432]Nothing pretty, but it's still neat. I worked out the frustum calculations and such for the player's view, and applied it to 3d2d. I will be using this to eventually maybe make some UI :)[/QUOTE] That looks promising for HUDs, addding a little swivel of angles and offsets based on movement could make for some nice HUDs, although clipping might be an issue :v
[QUOTE=Z0mb1n3;52204432]Nothing pretty, but it's still neat. I worked out the frustum calculations and such for the player's view, and applied it to 3d2d. I will be using this to eventually maybe make some UI :)[/QUOTE] [URL="https://github.com/Mysterypancake1/PhotoReal/blob/master/lua/autorun/client/photoreal.lua#L5"]Is it the same as this?[/URL] Someone gave me that a while ago (I think bobbleheadbob) [CODE] cam.Start3D2D( pos+ang:Forward()*(math.sqrt(ScrW()*ScrH())/2)+ang:Right()*-(ScrW()/2)+ang:Up()*(ScrH()/2), Angle(0,ang.y-90,-ang.p+90), 1 ) [/CODE] If yours is simpler that'd be very useful for me
[QUOTE=MPan1;52204792][URL="https://github.com/Mysterypancake1/PhotoReal/blob/master/lua/autorun/client/photoreal.lua#L5"]Is it the same as this?[/URL] Someone gave me that a while ago (I think bobbleheadbob) [CODE] cam.Start3D2D( pos+ang:Forward()*(math.sqrt(ScrW()*ScrH())/2)+ang:Right()*-(ScrW()/2)+ang:Up()*(ScrH()/2), Angle(0,ang.y-90,-ang.p+90), 1 ) [/CODE] If yours is simpler that'd be very useful for me[/QUOTE] o dear i have no idea what that code is basing anything off of. regardless, I'll probably never get around to it anyway so here have my utility functions. [code]local scale = 0.07 local dist = 80; -- Source Engine has "special" fov calculations, so this translates player:GetFOV() values (fov_desired) to real horizontal fov local function RealFov(fov) local ratio = (ScrW() / ScrH()); fov = math.rad(fov); local ratioRatio = ratio / (4 / 3); return 2 * math.deg(math.atan(math.tan(fov / 2) * ratioRatio)); end; -- Convert fov to vertical fov local function HorizontalToVerticalFov(fov) fov = math.rad(fov); local vfovrad = 2 * math.atan(math.tan(fov / 2) * (ScrH() / ScrW())); return math.deg(vfovrad); end; -- Calculate the dimensions of a frustum local function FrustumDimensions(fov, distance) local ratio = (ScrW() / ScrH()); local hfov = RealFov(fov); local vfov = HorizontalToVerticalFov(hfov); local frustumHeight = 2.0 * distance * math.tan(vfov * math.rad(0.5)); local frustumWidth = frustumHeight * ratio; return frustumWidth, frustumHeight; end; surface.CreateFont("Frustum", { font = "Century Gothic", size = 500, antialias = true }); hook.Add("PostDrawTranslucentRenderables", "f", function() local player = LocalPlayer(); local originalAng = player:EyeAngles(); local ang = player:EyeAngles(); local w, h = FrustumDimensions(player:GetFOV(), dist); ang:RotateAroundAxis(ang:Right(), 90); ang:RotateAroundAxis(ang:Up(), -90); local widthratio = w / ScrW() / scale; local heightratio = h / ScrH() / scale; cam.Start3D2D(player:EyePos() + originalAng:Forward() * dist - originalAng:Right() * (w / 2) + originalAng:Up() * (h / 2), ang, scale); draw.NoTexture(); surface.SetDrawColor(color_white); surface.DrawRect(0, 0, 500 * widthratio, 100 * heightratio); draw.DrawText("Hi guys", "Frustum", 0, 0, color_black, 0) cam.End3D2D(); end);[/code] A bit more robust than what you're doing and requires an extra calculation when scaling things (multiply all x, y coordinates and width/height parameters by widthratio and heightratio respectively) to mimic screenspace coordinates. Also allows you to specify the distance from the camera.
Ok I'm making a pseudo admin mod/plugin framework, and it's basically done, but I needed a menu of some kind. None of the buttons work yet, as I have no sub-menu design, but proof of concept I guess. [quote][vid]http://zombine.me/file/Half%20Life%20%20Source%2005.09.2017%20-%2002.48.06.05.mp4[/vid][/quote]
It's been 2 days since parakeet announced that we're working on gm_voxelate again, so here's a status update: although it seems like nothing much has happened, the Shitcode Removal Dept. has been hard at work fixing up old code and refactoring everything to accomodate for an infinite world. As we were fixing up the old network code, I realised that gmod's net library just isn't enough to handle sending 10 * 10 * 16 chunks (1600 chunks = 6553600 blocks = 13.1072 MB) of data quickly enough to the client. So, since I wanted to see how far we can take the source engine and gmod, we reinvented the wheel by writing our own network system that uses ENet under the hood. Not much to show at the moment other than this screenshot of the client disconnecting, reconnecting, performing an auth handshake with the server and requesting for the world config. [t]http://i.imgur.com/6Gw2Gvr.png[/t] [URL="https://github.com/glua/gm_voxelate/blob/better_voxel_storage/lua/voxelate/channels/voxelworldinit.lua"]here's the code for the network channel that handles world initialisation[/URL] let's see where this goes :dogcited:
[QUOTE=swadicalrag;52205741]It's been 2 days since parakeet announced that we're working on gm_voxelate again, so here's a status update: [/QUOTE] Hello yes this is the shitcode removal department. The best shitcode I have located so far is this PHP-looking turd that I intend to deal with later today: [code] int out_len = v->getChunkData(x, y, z, data); if (out_len == 0) { LUA->PushBool(true); return 1; } LUA->PushString(data,out_len); return 1; [/code] What on earth was I thinking? Fun fact: The commit count is nearly doubled on Swad's branch. Merging is going to be fun.
hello? What's happening there
[QUOTE=swadicalrag;52205741] As we were fixing up the old network code, I realised that gmod's net library just isn't enough to handle sending 10 * 10 * 16 chunks (1600 chunks = 6553600 blocks = 13.1072 MB) of data quickly enough to the client. let's see where this goes :dogcited:[/QUOTE] Out of curiosity, why send the entire world? Why not send a seed for whatever generation and send updates?
[QUOTE=Apickx;52207246]Out of curiosity, why send the entire world? Why not send a seed for whatever generation and send updates?[/QUOTE] Even better, why not just send what can be seen, and what's interacting with physics? [editline]9th May 2017[/editline] Page king. I haven't made jack shit in 2 months, nothing to post. Sorry bois
Sending the seed is a security issue - which is why Minecraft doesn't do the same People can load the seed and find whatever they want, and it would also become a lot clearer what has changed within the world when networking - making things apparent such as finding people's bases and houses underground
Redesigning my admin mod. [t]http://image.prntscr.com/image/136a1012739440a99e5771df2e1b58c6.png[/t] [url=https://player.vimeo.com/video/216762531]Video demonstration (and yes, the window saves location/size)[/url] And for reference, here's the old menu: [t]http://image.prntscr.com/image/e6adcf1894c44794822654dc16959c74.png[/t]
[QUOTE=Apickx;52207246]Out of curiosity, why send the entire world? Why not send a seed for whatever generation and send updates?[/QUOTE] As meep said, [I]kind-of[/I] a security issue. Another pretty big issue is that mapgen is [b]expensive[/b], and we would need to re-gen chunks on both the client and server each time we want to send full chunk updates. We already compress chunks when networking at that works quite well. [QUOTE=VeXan;52207335]Even better, why not just send what can be seen, and what's interacting with physics? [editline]9th May 2017[/editline] Page king. I haven't made jack shit in 2 months, nothing to post. Sorry bois[/QUOTE] We send the entire world for small maps (ones that can fit in gmod) and send only nearby chunks for the very early in development huge maps (minecraft style "infinite" ones that can't fit in gmod so well but that's okay because we've decided to build our own game engine on top of gmod what the fuck have i agreed to). Just got done with the new voxel storage scheme, which is a little slower but is pretty much required for huge worlds. This thing is still way too much fun to play with. Kleiner for scale. [quote][img]http://cogg.rocks/uploads/hl2_2017-05-09_23-20-36.png[/img][/quote]
[QUOTE=MadParakeet;52208806]As meep said, [I]kind-of[/I] a security issue. Another pretty big issue is that mapgen is [b]expensive[/b], and we would need to re-gen chunks on both the client and server each time we want to send full chunk updates. We already compress chunks when networking at that works quite well. We send the entire world for small maps (ones that can fit in gmod) and send only nearby chunks for the very early in development huge maps (minecraft style "infinite" ones that can't fit in gmod so well but that's okay because we've decided to build our own game engine on top of gmod what the fuck have i agreed to). Just got done with the new voxel storage scheme, which is a little slower but is pretty much required for huge worlds. This thing is still way too much fun to play with. Kleiner for scale.[/QUOTE] Can we get a poster shot so we can see Kleiner's face?
[QUOTE=MadParakeet;52208806](minecraft style "infinite" ones that can't fit in gmod so well but that's okay because we've decided to build our own game engine on top of gmod what the fuck have i agreed to)[/QUOTE] Don't worry. [url=http://gunshowcomic.com/648]Things are going to be okay.[/url]
[QUOTE=Darkomni;52204193][vid]https://my.mixtape.moe/tzyywc.webm[/vid] Currently designing some fun and intuitive movement mechanics for an eventual PvP gamemode I'd like to make. The goal is to make something as crazy and hectic as possible, while still being incredibly skillful and fun. My current list of mechanics: Wall jump Double jump Long jump Duck tap Crouch slide I also have a jetpack, but I didn't use it in this video demonstration, and I'm still on the fringe on whether or not I want to include it.[/QUOTE] I Can just imagine implementing a "The Floor Is Lava" mechanic to this while PVP'ing. It would be chaos and rage inducing but funny as hell to play.
[QUOTE=Ott;52196892][t]http://i.imgur.com/fWjEuKA.jpg[/t] [video=youtube;F3CIZ1GqDYQ]https://www.youtube.com/watch?v=F3CIZ1GqDYQ[/video][/QUOTE] santosrp?
hey
[QUOTE=Lonke;52211343]hey[/QUOTE] this dude better get in the highlights for next month
i'm new to lua (finally got into it back in march after a few years of failed attempts), and i've recently gotten my simple and stupid bots for extreme football throwdown to work on a test map, and had a full 7v7 game with them. they obviously still need some more work done on them. [video=youtube;mdu_Pi29o10]https://www.youtube.com/watch?v=mdu_Pi29o10[/video]
[QUOTE=Lonke;52211343]hey[/QUOTE] Your comment broke my browser. Are you happy now?
Sorry, you need to Log In to post a reply to this thread.