I seriously don't know why I quit GMod nearly two years ago..
But since I've discovered my passion for GMod again, I've started coding on my old, unfinished stuff and also on some new stuff..
..Prop-Blur for example (the only thing I could take screenshots from):
[url]http://cloud-2.steampowered.com/ugc/559830844515770758/F57771142F672CC87F4BFDD17EFE5CC058D46DB6/[/url]
[url]http://cloud-2.steampowered.com/ugc/559830844515765669/13F67D0CD568CEB5C297292675224385438AF6F8/[/url]
[url]http://cloud.steampowered.com/ugc/559830844515790983/29DE6F39D79C15D70FFF3B053250A391E8611994/[/url]
[url]http://cloud.steampowered.com/ugc/559830844515775035/676898AA04860EE1292621715858C8F8BF9C6AB7/[/url]
[url]http://cloud-2.steampowered.com/ugc/559830844515783895/FE2B1E7ACF9119FE5D64AA54B866B76B16EB5BBC/[/url]
[url]http://cloud.steampowered.com/ugc/559830844515824377/AC8D989D15C7854A1059648BE2D06018EC28E2B8/[/url]
[url]http://cloud.steampowered.com/ugc/559830844515824377/AC8D989D15C7854A1059648BE2D06018EC28E2B8/[/url]
[url]http://cloud.steampowered.com/ugc/559830844515798013/C933FD65E2AD9E6D205E89094A6F2F1B0231A2F6/[/url]
[url]http://cloud.steampowered.com/ugc/559830844515780980/FD51E63BEA4994C029EA55AB5CE8C5A4C20D8054/[/url]
[url]http://cloud-2.steampowered.com/ugc/559830844515827644/5822B26FE4E290E4808F6E4584B3EEC276F39045/[/url]
[url]http://cloud.steampowered.com/ugc/559830844515835403/00342C9E49FCAEE7898814A0D00E35D51E4DB65B/[/url]
[QUOTE=Remscar;38226621]I tried, it wasn't very happy.[/QUOTE]
[lua]local ent = ClientsideModel("models/props_junk/Rock001a.mdl", RENDERGROUP_OPAQUE)
ent:SetPos(pos + dir * 16)
ent:PhysicsInitBox(vNBounds, vBounds)
ent:SetCollisionBounds(vNBounds, vBounds)
ent:GetPhysicsObject():SetMaterial("rock")
ent:GetPhysicsObject():ApplyForceOffset(ent:GetPos() + VectorRand() * 5, dir * math.Rand(300, 800))
[/lua]
Taken from inside one of my effects.
[QUOTE=Lexic;38223223][thumb]http://i.imgur.com/g9gqM.jpg[/thumb]
Jumping aboard this skypaint train with some ~creepy~ and ~realistic~ halloweeny fog.
It was a bit of a kerfuffle to get it working on downtown, but this seems to do the trick
[lua]hook.Add("Initialize", "skypaaaint", function()
env_skypaint = ents.Create('env_skypaint')
env_skypaint:Spawn();
env_skypaint:Activate();
game.ConsoleCommand("sv_skyname painted\n");
fog = ents.Create('env_fog_controller');
fog:Spawn();
fog:Activate();
end)
[/lua][/QUOTE]
I think Silent Hill: Revelation came out the day before yesterday. This looks pleasant. haha
I'm working on a MUD/MUSH base for Garry's Mod. Why I am doing this, I do not know.
[img]http://i49.tinypic.com/2czn87.jpg[/img]
[QUOTE=Lexic;38223223][thumb]http://i.imgur.com/g9gqM.jpg[/thumb]
Jumping aboard this skypaint train with some ~creepy~ and ~realistic~ halloweeny fog.
It was a bit of a kerfuffle to get it working on downtown, but this seems to do the trick
[lua]hook.Add("Initialize", "skypaaaint", function()
env_skypaint = ents.Create('env_skypaint')
env_skypaint:Spawn();
env_skypaint:Activate();
game.ConsoleCommand("sv_skyname painted\n");
fog = ents.Create('env_fog_controller');
fog:Spawn();
fog:Activate();
end)
[/lua][/QUOTE]
Does sv_skyname change the skybox texture to use the skypaint skybox?
I've been trying to implement fog in my weather system, preferably without spawning a fog controller since i don't want to mess with the fog that's already on the map
Is the saverestore library broken? The save and restore hooks aren't called anymore. (This is why some things like the cleanup list don't save when loading a save)
[QUOTE=JetBoom;38227506]
local ent = ClientsideModel("models/props_junk/Rock001a.mdl", RENDERGROUP_OPAQUE) ent:SetPos(pos + dir * 16) ent:PhysicsInitBox(vNBounds, vBounds) ent:SetCollisionBounds(vNBounds, vBounds) ent:GetPhysicsObject():SetMaterial("rock") ent:GetPhysicsObject():ApplyForceOffset(ent:GetPos() + VectorRand() * 5, dir * math.Rand(300, 800))
Taken from inside one of my effects.[/QUOTE]
Helps but now I'm battling the think function...
For some reason it only gets called once, and no matter what i do the effect never dies.
[editline]1000[/editline]
nvm
[QUOTE=twoski;38229929]Does sv_skyname change the skybox texture to use the skypaint skybox?[/QUOTE]Yes. If [I]sv_skyname[/I] is not set to "painted", the [I]env_skypaint[/I] entity won't have any effect onto the skybox.
[QUOTE=Remscar;38230330]Helps but now I'm battling the think function...
For some reason it only gets called once, and no matter what i do the effect never dies.[/QUOTE]
Code? Maybe we can help you out..
how you did that prop blur thing? It would be awesome if that thing applied to ejected brass or something
[QUOTE=twoski;38229929]Does sv_skyname change the skybox texture to use the skypaint skybox?
I've been trying to implement fog in my weather system, preferably without spawning a fog controller since i don't want to mess with the fog that's already on the map[/QUOTE]
Yes, but you have to change it before anyone joins. There are a selection of fog functions in the Render library, but I've never managed to get them to work.
You could try always spawning one in Initialize (which should override anything baked into the map as source only pays attention to the first one spawned) then catch any map defaults that try to get applied with EntityKeyValue and apply them to your fog controller. Then you can apply your fog as necessary and restore to the map defaults once you're done.
[QUOTE=Tobba;38219524]Black sky doesnt actually happen to me, but for some reason the clip plane is applied flipped to the 3D skybox
[editline]28th October 2012[/editline]
[vid]https://dl.dropbox.com/u/4838268/gm_construct%202012-10-28%2014-16-30.webm[/vid]
With my method, you can also have any amount of portals, but you cant easily recurse portals
Also I do actually have the black sky issue, its because the camera ends up having a position inside the void which causes the sky to not render, I'm not exactly sure how to fix that[/QUOTE]
If you're making the portals for a specific reason then you could probably just make maps fit for them so you don't get the black sky issue.
What are you aiming to do? Would be sick if you made some library or something for portals.
[QUOTE=FoohyAB;38229991]Is the saverestore library broken? The save and restore hooks aren't called anymore. (This is why some things like the cleanup list don't save when loading a save)[/QUOTE]
The saverestore library was used for the old source engine saving method.
This new one is made in Lua, so garry would need to call those hooks by himself.
I think there's a similar way already, I'll take a look.
DT Vars should automatically be saved by the new save system, but for the other variables I guess you'll have to use the duplicator functions, such as duplicator.RegisterEntityClass, duplicator.StoreEntityModifier and duplicator.RegisterEntityModifier if you aren't already.
Take a look at gamemodes\sandbox\entities\weapons\gmod_tool\stools\colour.lua for an example.
[QUOTE=rebel1324;38232243]how you did that prop blur thing? It would be awesome if that thing applied to ejected brass or something[/QUOTE]It's pretty simple. I'll release the code later, when I've fully optimized it.
And actually, the effect applies on everything I want it to apply on.
New F4 menu
[img]http://puu.sh/1k9bc[/img]
[img]http://puu.sh/1k9bH[/img]
[img]http://puu.sh/1k99w[/img]
That looks amazing. Is it just for your server?
[QUOTE=Drakehawke;38236035]New F4 menu
[img]http://puu.sh/1k9bc[/img]
[img]http://puu.sh/1k9bH[/img]
[img]http://puu.sh/1k99w[/img][/QUOTE]
Awesome looking, Bletotum I guess thinks its not new or he put the wrong rating.
Moved the hook system to the engine.. but in my tests.. it's actually testing SLOWER! Which is not what I expected at all!
It's as optimized as it can be, so I'm guessing the performance drop is due to repeatedly pushing all the argument indexes back to the top of the stack and the calling from c++ to lua.
[IMG]http://dl.dropbox.com/u/4838268/ZScreen/2012-10/Screenshot-2012-10-29_23.27.09.png[/IMG]
Too bad garrys GetMesh function sucks so with how these work right now two of them colliding brings my game down to 5 FPS
The issue is that GetMesh doesnt return convex for convex, it returns every convex in a gigantic soup, however, thankfully PhysicsFromMesh makes me a concave mesh, the issue? Concave mesh collision is hilariously slow, I would use PhysicsInitMultiConvex but GetMesh doesnt give me any data I can pass to that
tl;dr I need a GetMesh function that gives me data for each convex, not each convex merged to make this not be hilariously slow
[editline]29th October 2012[/editline]
I might add concave <-> convex collision doesnt seem to be too slow, but Havok wasent designed to do Concave <-> Concave
Cratecepticon?
actually in the tread that looks pretty nice..
Way To Rip Me Off DrakeHawke Look I Gave You The Code Over Steam So You Could Learn From It Not Copy Paste From It
You know, by the time that idiot is done with whatever it is he thinks he's accomplishing, all ipv4 ips will be banned from facepunch....
[QUOTE=Remscar;38224429]Trying to get gibs working, they don't want to cooperate though.
No matter what i try, it refuses to initiate a physicsobject in an effect![/QUOTE]
Have you already precached the models on the server? If not, you should probably do that.
What can I add to this custom link to make it not have a white background?
[code]
local LINKLABEL = { }
function LINKLABEL:Init()
self.TextFont = "TacoButtonFont";
self.TextColor = Color( 255, 255, 255, 255 );
self.BGColor = Color( 255, 255, 255, 255 );
self.HoverColor = Color( 60, 60, 200, 255 );
self.Highlighted = false;
self.Label = vgui.Create( "Label", self );
self.Label:SetFontInternal( self.TextFont );
self.Label:SetText( "" );
self.Label:SetMouseInputEnabled( false );
end
function LINKLABEL:SetTextColor( color )
self.TextColor = color;
self:InvalidateLayout();
end
function LINKLABEL:SetBGColor( color )
self.BGColor = color;
self:InvalidateLayout();
end
function LINKLABEL:SetHoverColor( color )
self.HoverColor = color;
self:InvalidateLayout();
end
function LINKLABEL:SetLinkText( text )
self.Text = text;
surface.SetFont( self.TextFont );
local w, h = surface.GetTextSize( self.Text );
self:SetSize( w, h );
self.Label:SetSize( w, h );
self.Label:SetText( text );
end
function LINKLABEL:SetLinkFont( font )
self.TextFont = font;
self.Label:SetFontInternal( self.TextFont );
end
function LINKLABEL:SetCallback( cb )
self.Callback = cb;
end
function LINKLABEL:OnMousePressed()
if( self.Callback ) then
self.Callback( self );
end
end
function LINKLABEL:OnCursorEntered()
self.Highlighted = true;
self:ApplySchemeSettings();
end
function LINKLABEL:OnCursorExited()
self.Highlighted = false;
self:ApplySchemeSettings();
end
function LINKLABEL:PerformLayout()
self.Label:SetPos( 0, 0 );
end
function LINKLABEL:ApplySchemeSettings()
if( self.Highlighted ) then
self.Label:SetFGColor( self.HoverColor );
else
self.Label:SetFGColor( self.TextColor );
end
end
function LINKLABEL:Paint()
return true;
end
vgui.Register( "TacoLink", LINKLABEL, "Button" );[/code]
BGColor is what I was trying.
it's like you guys poop great code.
show me your ways :(
[QUOTE=Drakehawke;38236035]New F4 menu
[img]http://puu.sh/1k9bc[/img]
[img]http://puu.sh/1k9bH[/img]
[img]http://puu.sh/1k99w[/img][/QUOTE]
bringing back that web 2.0 phase all over again
are you going to have a bunch of paint splatter and vector shapes on the corner next?
just kidding
[QUOTE=Hentie;38245919]bringing back that web 2.0 phase all over again
are you going to have a bunch of paint splatter and vector shapes on the corner next?
just kidding[/QUOTE]
i don't get it :(
[QUOTE=Drakehawke;38246407]i don't get it :([/QUOTE]
You're going way too heavy on the outlines for everything and your job colors are gaudy. Also, gradients are SO 4 years ago.
[QUOTE=jmazouri;38246842]You're going way too heavy on the outlines for everything and your job colors are gaudy. Also, gradients are SO 4 years ago.[/QUOTE]
Yeah, let's use plain colored rectangles, 'cuz that's how we do it today.
Restored back to Lua hook system today. Gained 10 fps in the mix in my timedemo, due to other optimizations I made whilst trying to get the engine hook system to not perform like shit.
Timedemo is up to 155 fps now, from 127fps on friday.
Sorry, you need to Log In to post a reply to this thread.