• GMod - What are you working on? November 2015 (#51)
    264 replies, posted
[QUOTE=swadicalrag;49155486]After its successful induction and surprisingly warmhearted acceptance in the Garry's Mod Lua chatroom, I've decided to publicise the library that brought the members of the chat room together and gave them something to talk about for years, and days to come: [URL="https://gist.github.com/SwadicalRag/092509a82d563248bef6"]the cock v2 library[/URL]: hopefully it will find a new home in your garry's mod clients and servers, with your (hopefully) good sense of humor and appreciation of satire.[/QUOTE] Was having hella fun with that last night
I'm making a bot that answers to questions players type in. The server admins can configure the a few things like community name, community link and a few other things. This bot currently has over 300 if statements (and still increasing). On my own server, I added a log of failed answers so I can add them daily. Apart from the informative part, it also has a wide variety of social answers. This is a simple idea but takes a long time (it will have shit tons of if statements at its release date).
why not use a table? like look for keywords and stuff [lua] local keywords = { rules = function() end --do whatever } for k, v in pairs(keywords) do if(msg:find(k)) then return v() end end [/lua] you get the idea
[QUOTE=Skere_;49159941]I'm making a bot that answers to questions players type in. The server admins can configure the a few things like community name, community link and a few other things. This bot currently has over 300 if statements (and still increasing). On my own server, I added a log of failed answers so I can add them daily. Apart from the informative part, it also has a wide variety of social answers. This is a simple idea but takes a long time (it will have shit tons of if statements at its release date).[/QUOTE] Sounds like poor design, should make it use a DB of some kind to cut down on the hard coded if statements. [url]http://www.cleverscript.com/[/url]
[QUOTE=Skere_;49159941]I'm making a bot that answers to questions players type in. The server admins can configure the a few things like community name, community link and a few other things. This bot currently has over 300 if statements (and still increasing). On my own server, I added a log of failed answers so I can add them daily. Apart from the informative part, it also has a wide variety of social answers. This is a simple idea but takes a long time (it will have shit tons of oe aiy aannwr qy duiur a fgayr? xD
I'm not writing everything out, just copy pasting it while only changing the find. and output. I don't think either of those suggestions will make it any faster
So I made this little inventory system over the last two days for a gamemode that I'm not sure what I'm doing with, it's not visually appealing yet or anything but the good thing about it is that it's the most dynamic thing I've made(which probably isn't all that special), it's not a player based thing but everything in the world can be a container and hold something as long as it's coded to it, it can have as many slots as it chooses to have, etc. My next step is to give items their ability to hold things, such as a container having three extra slots but the weight of that comes as a penalty on the players overall carry weight. From there I'd like to give weapons the ability to hold things like attachments or stat buffers and a little slot for ammo, enough jibber-jabber, I'll have a video for that when it's done but here is my non-astheticaly pleasing inventory [video]https://youtu.be/7gXGi-uAr9Y[/video] Here's to hoping I actually got video tags right for once
[video]https://youtu.be/xaElZbHTRhM[/video] sound credit to disney
[QUOTE=Skere_;49161158]I'm not writing everything out, just copy pasting it while only changing the find. and output. I don't think either of those suggestions will make it any faster[/QUOTE] you are doing over 300 checks a message, but using a table, you would be using one check a message.
[QUOTE=Skere_;49159941]I'm making a bot that answers to questions players type in. The server admins can configure the a few things like community name, community link and a few other things. This bot currently has over 300 if statements (and still increasing). On my own server, I added a log of failed answers so I can add them daily. Apart from the informative part, it also has a wide variety of social answers. This is a simple idea but takes a long time (it will have shit tons of if statements at its release date).[/QUOTE] I've been thinking about making something like this (Lazy me, I'm not going to). But instead of just answering questions, it would just respond to anything.
Added flashbangs and smoke grenades to my weapon pack. [media]https://www.youtube.com/watch?v=EPOolQ0ZjlY[/media]
[QUOTE=PigeonPatrol;49162021]you are doing over 300 checks a message, but using a table, you would be using one check a message.[/QUOTE] Tell me at all how this makes any sense. You're still checking every single option for the message until you've found it, you're also only reducing the if statements, making the code a lot neater and easier to read. No way does it mean there'd be only one check.
[QUOTE=PigeonPatrol;49162021]you are doing over 300 checks a message, but using a table, you would be using one check a message.[/QUOTE] As if a couple milliseconds is going to cause major lag when running commands.
[t]https://dl.dropboxusercontent.com/u/17839069/C_393.jpg[/t] [t]https://dl.dropboxusercontent.com/u/17839069/C_390.jpg[/t] I've been running into issues with the shadows( LOOK at the roof of the room with benches ). Lol, oh well.. I plan on opening my server by December. My [url=http://www.greatnessgaming.com]website[/url] which I've spent quite a while setting up. I haven't posted in a bit.
[QUOTE=EthanTheGreat;49167504][t]https://dl.dropboxusercontent.com/u/17839069/C_393.jpg[/t] [t]https://dl.dropboxusercontent.com/u/17839069/C_390.jpg[/t] I've been running into issues with the shadows( LOOK at the roof of the room with benches ). Lol, oh well.. I plan on opening my server by December. My [url=http://www.greatnessgaming.com]website[/url] which I've spent quite a while setting up. I haven't posted in a bit.[/QUOTE] Did you set the shadow_control direction correctly? The pitch is inversed from the sun angle.
[QUOTE=vexx21322;49168678]Did you set the shadow_control direction correctly? The pitch is inversed from the sun angle.[/QUOTE] Yeah, you're totally right xD. Angle was -90 0 0 instead of 90 0 0? Which is pointing downwards.
[QUOTE][IMG]http://images.akamai.steamusercontent.com/ugc/402306273358769905/450801FD41A4BBE3128055845EE7F88908C4C0E1/[/IMG][/QUOTE] Pseudo 3D engine for Gmod. Spent all weekend writing. It was super fun because I had no idea that pseudo 3d racers are just a straight track with left and right offsets, no physical curves or hills! those are illusions by the renderer. It has multiplayer support thanks to net library but it's very shitty since I've finished it like 10 minutes before writing this. It has no prediction or anything, just let's you know where other people are on the track every second. In the future I'll lower the delay and implement predictions by using velocity so it doesn't look so rough. It already has support for sprites on the track, I just have none. I have to go sleep now but I'll post a video of it tomorrow. P.S. I get around 250~ fps
Working on the new menu for gamemode :v: [img_thumb]http://i.imgur.com/JIDF1cL.jpg[/img_thumb] [img_thumb]http://i.imgur.com/JjzOuey.jpg[/img_thumb]
secret stashes, you say? [video=youtube_share;IR5DyZa3kEQ]http://youtu.be/IR5DyZa3kEQ[/video]
Decided to try and remake CS:S in gmod. Started the other day, made some shit progress [video=youtube;FKmMmzmc_aQ]http://www.youtube.com/watch?v=FKmMmzmc_aQ[/video]
[QUOTE=Z0mb1n3;49172277]amazing stuff[/QUOTE] That is sooooo cool! I do wonder though, is the light just randomly activated or is there something I'm missing? Also, how are you doing this? Is it possible to take slices of world geometry like you can with props?
[QUOTE=roastchicken;49172366]That is sooooo cool! I do wonder though, is the light just randomly activated or is there something I'm missing? Also, how are you doing this? Is it possible to take slices of world geometry like you can with props?[/QUOTE] The light is being controlled by my numpad, because of how I'm rendering the interior, it gets dark, so I added the light to give you guys a better look inside. Even in broad daylight it can be dark. The door is done using RT cameras.
[QUOTE=Z0mb1n3;49172464]The door is done using RT cameras.[/QUOTE] Oh, so you can't actually put things inside? Still pretty cool.
[QUOTE=roastchicken;49173190]Oh, so you can't actually put things inside? Still pretty cool.[/QUOTE] Well the interior is stencilled in, but I do have code that will, when finished, allow you to store weapons inside.
[t]http://i.imgur.com/wAo0q4V.png[/t] [t]http://i.imgur.com/Tt5JEkI.png[/t] [t]http://i.imgur.com/PnK2o35.jpg[/t] Making the map space larger, took time but.. I did it. So far it's been difficult, but I've successfully been able to increase the map space without [I]RenderTarget Portals.[/I] The entire map, gets me 300fps without any entities. Map Space x 20 times = One Huge Map. The City needs to expand further... The Brush Limit is: 55%. Face Limit: 30%. The majority of the work was adjusting it to be realistic: Torque, Friction, and Angular Trajectory.
Created a little buff system for weapons in my gamemode, eventually upgrading weapons will have an effect on their name, making them all unique. Buffs in this video have pre-scripted names but that's only because I just started to make the system, the next thing for me to do is have generated names depending on how strong their effects are and whatt type of effect they are. All weapons have pre-generated amounts of slots, ranging from 1 to 5, making guns with 5 slots the most valuable. [video]https://youtu.be/m2_o329OlWU[/video]
I'm working on a simple Vehicle mod that is fully made in Lua. I don't have pictures yet, but it will be a steam train. It will fit in well with my previous addons for open-stock wagons and such.
[QUOTE=jrj996;49181599]Created a little buff system for weapons in my gamemode, eventually upgrading weapons will have an effect on their name, making them all unique. Buffs in this video have pre-scripted names but that's only because I just started to make the system, the next thing for me to do is have generated names depending on how strong their effects are and whatt type of effect they are. All weapons have pre-generated amounts of slots, ranging from 1 to 5, making guns with 5 slots the most valuable. [video]https://youtu.be/m2_o329OlWU[/video][/QUOTE] Very cool! The buff layout is a bit hard to read. Maybe use a different font or get rid of the slot numbering, and instead put a number in one of the corners?
[QUOTE=Ott;49133931]SetStepSize[/QUOTE] Somehow I missed this post. I'm already using SetStepSize, but there's a huge difference in how Doom did it and how Source does it. In Doom, the maps are essentially 2D, and it's really easy to do math with floor and ceiling heights at sector boundaries. The game has no problem with checking the step height while simultaneously making sure the player can fit into the sector they are moving into. In Source, the map format isn't so simple and restrictive, and so such information is not readily available. What Source does, is a HullTrace that is offset from the player by whatever you set the max step height to, going in the direction that the player is trying to move in. If the trace hits something, then the step must be too high, and the player does not 'step up'. The problem is that Source can't tell the difference between the trace hitting the floor of the next room (and therefore, the step being too high), or the ceiling of it. Many sectors in Doom's levels are just big enough to fit the player in, and in Source, are impossible to 'step up' into unless the floor height difference is exactly at the max step height. I've thought about a hack where every tick, I change the max step height to the difference in floor height of the sector they are currently in vs the sector they are moving towards... but I'm not really thrilled with the idea. It's one of those things I [i]might[/i] get around to testing one day, and uploading the change if it works really well. But this is getting off-topic. This is 'What are you working on?', not 'What might you possibly be working on at some unspecified point in the future?'. I'm working on something that resembles a MIDI player. The Doom stuff is something I previously worked on, and will be the first use of the MIDI player (if I finish it).
[QUOTE=Z0mb1n3;49182963]Very cool! The buff layout is a bit hard to read. Maybe use a different font or get rid of the slot numbering, and instead put a number in one of the corners?[/QUOTE] I'll try that, I wasn't sure what color scheme to go for :/ I was struggling with that a bit while I was making it but I don't have a scheme for the gamemode yet even though there's plenty of grey and white but I'll figure it out in time
Sorry, you need to Log In to post a reply to this thread.