• What Are You Working On? -- October 2012
    585 replies, posted
[QUOTE=CapsAdmin;38207059]Not much of a json fan in lua. Sure it's useful to have when dealing with the internet but for internal uses it it feels like if you were to use a lua compilable data in javascript. Why not make "lson"? There are many implementations of it out there and it's relatively easy to make.[/QUOTE] Yeah. Or just use Json cause it does the trick, and I won't have to swap between it and some other format - which ultimately is exactly the same - whenever I want to [i]deal with the internet[/i]. I guess for me Json is a standard that I follow. [editline]30th October 2012[/editline] Oh lord, what page was I on?!
[QUOTE=garry;38247033]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.[/QUOTE] Are you going to add a GetMesh function that separates each convex instead of rating me dumb Only other soloution is writing a .PHY file loader and taking the data from there
[QUOTE=Tobba;38247871]Are you going to add a GetMesh function that separates each convex instead of rating me dumb Only other soloution is writing a .PHY file loader and taking the data from there[/QUOTE] Yes, of course, your positive humble attitude makes me want to help you!
[QUOTE=garry;38248040]Yes, of course, your positive humble attitude makes me want to help you![/QUOTE] My god man, do you [i]know[/i] who you're talking to?! Show some respect!
This is why you dont write bitchy sounding posts directly after waking up :v:
[QUOTE=vercas;38247011]Yeah, let's use plain colored rectangles, 'cuz that's how we do it today.[/QUOTE] [img]http://cdn.splatf.com/w/wp-content/uploads/2011/09/microsoft-metro-ui.jpg[/img] it's true
Progress on Garryware ! The system is more or less stable now, it filters badly coded minigames, also has some debug functions built in. Everything neccesary for the HUD is now sent to the client, so the serverside is almost totally finished. ( Still lacks proper support for awards, and for minigames that could run in multiple rooms ) [video=youtube;ngqTFPpRUeI]http://www.youtube.com/watch?v=ngqTFPpRUeI[/video] I made a really clean, and nice backend for the minigames. As a proof, check out the most complex minigame I ported yet: [URL]http://pastebin.com/gKaSK6Lp[/URL] ! [SUB]I decided to leave the authors in the minigames, despite I completely rewrote them, since its their idea, not mine.[/SUB] Since now it is in a playable state, anyone open to help me with porting the old games, and making new ones? If so, write me a PM :smile:
[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] But, but.. :( [IMG]http://i.imgur.com/iEWnF.jpg[/IMG]
Small update on my gamemode (video is laggy a little, because of Fraps): [video=youtube;iyrtDIV-uRc]http://www.youtube.com/watch?v=iyrtDIV-uRc[/video] Changed Team Deathmatch to King of the Hill, to propose some teamwork and tweaked gui a bit. Sadly hand animations are not currently working (because of no BuildBonePositions).
[QUOTE=CGNick;38250112]But, but.. :( [IMG]http://i.imgur.com/iEWnF.jpg[/IMG][/QUOTE] holy hell
Looking forward to timers in the engine, so my server isn't a house of cards :D
[QUOTE=garry;38247033]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.[/QUOTE] Constantly going from lua to engine will cause lag issues. It's best to stay in one state as long as you can. Any lua called hooks would especially cause issues.
[QUOTE=grobov13;38250216]Small update on my gamemode (video is laggy a little, because of Fraps): [video=youtube;iyrtDIV-uRc]http://www.youtube.com/watch?v=iyrtDIV-uRc[/video] Changed Team Deathmatch to King of the Hill, to propose some teamwork and tweaked gui a bit. Sadly hand animations are not currently working (because of no BuildBonePositions).[/QUOTE] People move way too fast. It looks more like luck when you get a kill than anything.
[QUOTE=vercas;38247011]Yeah, let's use plain colored rectangles, 'cuz that's how we do it today.[/QUOTE] [IMG]http://dl.dropbox.com/u/48488204/Screenshots/hl2%202012-10-30%2016-36-55-67.png[/IMG] It's true.
So since Garry removed BuildBonePositions and I'm waiting for him to add an alternate function to it, I decided to port Deception to GMod 13 and revamp it in the process. [media]http://www.youtube.com/watch?v=n3lqcSxw4ZI[/media] This was a very long and fun gameplay. I also called people over from /v/. They joined, had a blast and gave me good suggestions on what I should add/tweak/balance. Overall, a great playtest.
Flood Mod, the new new. Currently in a working beta, a lot of the hud and ui stuff is temporary but I like it for now. [IMG]https://dl.dropbox.com/u/30778198/2.png[/IMG]
[vid]https://dl.dropbox.com/u/4838268/gms_atoll_2008 2012-10-31 12-31-25.webm[/vid] I made this thing Only issue is that I cant make the stars fade out because all StarFade does is make it fade at lower positions, I have to set it to 0 to remove them completely when I only want to make them highly transparent [editline]31st October 2012[/editline] On the other hand I might as well render my own stars (as im gonna do with the clouds) since garrys sky shader doesnt handle them very well at all (the default starfield disorts into grain, trying to scale it down for less filter-raped stars just results in it fading out, which doesnt happen to any of my own textures)
tobba would you mind explaining how you do this? so far i understand that you have to create the env_skypaint entity but thats pretty much as i understand. also can you change the actual lighting of the map? so when its night time the map actually darkens.
You can't really change the lighting of the map, but you could use the colour modifier stuff to change the contrast/darkness/saturation so it looks like night.
oh nice :D i thought you could do it with a light_environment
[QUOTE=G4MB!T;38261497]tobba would you mind explaining how you do this? so far i understand that you have to create the env_skypaint entity but thats pretty much as i understand. also can you change the actual lighting of the map? so when its night time the map actually darkens.[/QUOTE] You have to give light_environment a targetname so it doesn't get removed by the entity system. You can then do this on it ent:Fire("SetPattern", math.char(num)) it's from 1-127 You can also grab the entity in the key value gamemode hook and do it there, but clients need to do a fullupdate for the light to change. Spawning dynamic lights will also update the block you spawn it on. That method works somewhat OK if the time is synced to realtime since players usually reconnect or crash (unfortunately) in time for the light to update. It seems like when it's not given a target name it doesn't network to clients properly. From the looks of it, it's just simply modifying the world's lightmap visibility, which usually looks much better than post processing.
[QUOTE=CapsAdmin;38261549]You have to give light_environment a targetname so it doesn't get removed by the entity system. You can then do this on it ent:Fire("SetPattern", math.char(num)) it's from 1-127 You can also grab the entity in the key value gamemode hook and do it there, but clients need to do a fullupdate for the light to change. Spawning dynamic lights will also update the block you spawn it on. That method works somewhat OK if the time is synced to realtime since players usually reconnect or crash (unfortunately) in time for the light to update. It seems like when it's not given a target name it doesn't network to clients properly. From the looks of it, it's just simply modifying the world's lightmap visibility, which usually looks much better than post processing.[/QUOTE] Actually it ranges from 97 to 122, a to z in ascii decimal.
[QUOTE=garry;38261508]You can't really change the lighting of the map, but you could use the colour modifier stuff to change the contrast/darkness/saturation so it looks like night.[/QUOTE] [url=http://facepunch.com/showthread.php?t=1220543&p=38224516&viewfull=1#post38224516]Yes you can[/url]. [editline]31st October 2012[/editline] [QUOTE=CapsAdmin;38261549]clients need to do a fullupdate for the light to change.[/QUOTE] Are we able to force this to happen? Console command? Something fiddly with sourcenet? Clientside module?
[QUOTE=ollie;38262005]Actually it ranges from 97 to 122, a to z in ascii decimal.[/QUOTE] That's what i thought it did too until i tested it on some other maps. anything below ~70 or above ~120 might not show visible results. It seems to depend on the light settings.
If you name the light_environment, it creates its own lighting style which is used for each lightmap lit by the light_environment There are some refreshing issues when you change the light style of it though, its probable that the brushes arent getting added to the refresh list properly But all that is in the Quake derived part of the engine code, its really a lost cause fixing the bugs with the weird flickering when dicking around with the light_environment [editline]31st October 2012[/editline] also random info: m is the normal light level, z is double and a is none [editline]31st October 2012[/editline] you can actually go below a and negative lighting occurs, it only really shows on props though
[QUOTE=Lexic;38262024] Are we able to force this to happen? Console command? Something fiddly with sourcenet? Clientside module?[/QUOTE] I think cl_fullupdate might do it, but requires cheats to be on (gm_cvar?) and it might break stuff. I have no idea if sourcenet could do it though.
[QUOTE=Lexic;38262024][url=http://facepunch.com/showthread.php?t=1220543&p=38224516&viewfull=1#post38224516]Yes you can[/url]. [editline]31st October 2012[/editline] Are we able to force this to happen? Console command? Something fiddly with sourcenet? Clientside module?[/QUOTE] From fishing around it looks like the cl_fullupdate command, but it's flagged as a cheat. edit: ninja
I'm writing a custom bullet system because i can't figure out how to make default bullets not draw decals on players. So far it's working perfectly except i can't figure out the default effects that play when you shoot a certain surface. Any ideas? [lua] SWEP.MatDecals = {} SWEP.MatDecals[ MAT_PLASTIC ] = "Impact.Concrete" SWEP.MatDecals[ MAT_CONCRETE ] = "Impact.Concrete" SWEP.MatDecals[ MAT_COMPUTER ] = "Impact.Concrete" SWEP.MatDecals[ MAT_TILE ] = "Impact.Concrete" SWEP.MatDecals[ MAT_METAL ] = "Impact.Metal" SWEP.MatDecals[ MAT_GRATE ] = "Impact.Metal" SWEP.MatDecals[ MAT_VENT ] = "Impact.Metal" SWEP.MatDecals[ MAT_DIRT ] = "Impact.Concrete" SWEP.MatDecals[ MAT_SAND ] = "Impact.Concrete" SWEP.MatDecals[ MAT_SLOSH ] = "Impact.Concrete" SWEP.MatDecals[ MAT_GLASS ] = "Impact.Glass" SWEP.MatDecals[ MAT_WOOD ] = "Impact.Wood" SWEP.MatSounds = {} SWEP.MatSounds[ MAT_PLASTIC ] = Sound( "Plastic_Box.BulletImpact" ) SWEP.MatSounds[ MAT_CONCRETE ] = Sound( "Concrete.BulletImpact" ) SWEP.MatSounds[ MAT_COMPUTER ] = Sound( "Computer.BulletImpact" ) SWEP.MatSounds[ MAT_TILE ] = Sound( "Tile.BulletImpact" ) SWEP.MatSounds[ MAT_METAL ] = Sound( "SolidMetal.BulletImpact" ) SWEP.MatSounds[ MAT_GRATE ] = Sound( "MetalGrate.BulletImpact" ) SWEP.MatSounds[ MAT_VENT ] = Sound( "SolidMetal.BulletImpact" ) SWEP.MatSounds[ MAT_DIRT ] = Sound( "Dirt.BulletImpact" ) SWEP.MatSounds[ MAT_SAND ] = Sound( "Dirt.BulletImpact" ) SWEP.MatSounds[ MAT_SLOSH ] = Sound( "Flesh.BulletImpact" ) SWEP.MatSounds[ MAT_GLASS ] = Sound( "Glass.BulletImpact" ) SWEP.MatSounds[ MAT_WOOD ] = Sound( "Wood.BulletImpact" ) SWEP.MatEffects = {} SWEP.MatEffects[ MAT_PLASTIC ] = "impact_concrete" // impact_x doesn't work SWEP.MatEffects[ MAT_CONCRETE ] = "impact_concrete" SWEP.MatEffects[ MAT_COMPUTER ] = "Sparks" // this works SWEP.MatEffects[ MAT_TILE ] = "impact_concrete" SWEP.MatEffects[ MAT_METAL ] = "impact_metal" SWEP.MatEffects[ MAT_GRATE ] = "impact_metal" SWEP.MatEffects[ MAT_VENT ] = "impact_metal" SWEP.MatEffects[ MAT_DIRT ] = "impact_dirt" SWEP.MatEffects[ MAT_SAND ] = "impact_dirt" SWEP.MatEffects[ MAT_SLOSH ] = "impact_dirt" SWEP.MatEffects[ MAT_GLASS ] = "GlassImpact" // this works SWEP.MatEffects[ MAT_WOOD ] = "impact_wood" function SWEP:CreateBullets( scale, dmg, num ) //if CLIENT then return end for i=1, num do local rand = VectorRand() * scale local dir = self.Owner:GetAimVector() + rand local trace = {} trace.start = self.Owner:GetShootPos() trace.endpos = trace.start + dir * 9000 trace.filter = { self.Owner, self.Weapon } trace.mask = MASK_SHOT local tr = util.TraceLine( trace ) local dmginfo = DamageInfo() dmginfo:SetAttacker( self.Owner ) dmginfo:SetInflictor( self.Weapon ) dmginfo:SetDamageType( DMG_BULLET ) dmginfo:SetDamage( dmg ) if IsValid( tr.Entity ) and not tr.HitWorld then if SERVER then tr.Entity:TakeDamageInfo( dmginfo ) end if tr.Entity:IsPlayer() then GAMEMODE:PlayerTraceAttack( tr.Entity, dmginfo, dir, tr ) else self.Weapon:BulletEffects( tr.MatType, tr.HitPos, tr.HitNormal ) if SERVER then local phys = tr.Entity:GetPhysicsObject() if IsValid( phys ) then phys:ApplyForceCenter( dir * ( ( dmg * 100 ) ) ) end end end else self.Weapon:BulletEffects( tr.MatType, tr.HitPos, tr.HitNormal ) end end end function SWEP:BulletEffects( mat, pos, norm ) if self.MatDecals[ mat ] then util.Decal( self.MatDecals[ mat ], pos + norm, pos - norm ) sound.Play( self.MatSounds[ mat ], pos, 75, math.random( 90, 110 ), 0.8 ) local eff = self.MatEffects[ mat ] local ed = EffectData() ed:SetOrigin( pos + norm ) ed:SetStart( pos + norm ) ed:SetNormal( norm ) ed:SetMagnitude( 1 ) ed:SetScale( 1 ) util.Effect( ( eff or "Sparks" ), ed ) end end[/lua]
[QUOTE=twoski;38262604]I'm writing a custom bullet system because i can't figure out how to make default bullets not draw decals on players. So far it's working perfectly except i can't figure out the default effects that play when you shoot a certain surface. Any ideas? [/QUOTE] This is some code from my Toybox minigun that you'll probably find relevant: [lua] local MatSurfacePropTranslate = { [MAT_ANTLION] = util.GetSurfaceIndex("antlion"), [MAT_BLOODYFLESH] = util.GetSurfaceIndex("bloodyflesh"), [MAT_CONCRETE] = util.GetSurfaceIndex("concrete"), [MAT_DIRT] = util.GetSurfaceIndex("dirt"), [MAT_FLESH] = util.GetSurfaceIndex("flesh"), [MAT_GRATE] = util.GetSurfaceIndex("metalgrate"), [MAT_ALIENFLESH] = util.GetSurfaceIndex("alienflesh"), [MAT_CLIP] = util.GetSurfaceIndex("player_control_clip"), [MAT_PLASTIC] = util.GetSurfaceIndex("plastic"), [MAT_METAL] = util.GetSurfaceIndex("metal"), [MAT_SAND] = util.GetSurfaceIndex("sand"), [MAT_FOLIAGE] = util.GetSurfaceIndex("foliage"), [MAT_COMPUTER] = util.GetSurfaceIndex("computer"), [MAT_SLOSH] = util.GetSurfaceIndex("water"), [MAT_TILE] = util.GetSurfaceIndex("tile"), [MAT_VENT] = util.GetSurfaceIndex("metalvent"), [MAT_WOOD] = util.GetSurfaceIndex("wood"), [MAT_GLASS] = util.GetSurfaceIndex("glass") } function SWEP:DoImpactEffect(tr, dmgtype) local edata = EffectData(); edata:SetOrigin(tr.HitPos); edata:SetNormal(tr.HitNormal); edata:SetHitBox(tr.HitBox); edata:SetEntity(tr.Entity); edata:SetDamageType(dmgtype); edata:SetStart(tr.StartPos); edata:SetSurfaceProp(MatSurfacePropTranslate[tr.MatType]); util.Effect("ImpactGunship", edata); --Can also be "Impact", probably others as well. These effects differ visually. return true; end [/lua] You can probably use the normal bullet system if you override SWEP:DoImpactEffect and just prevent the creation of an effect if the hit entity was a player. [editline]31st October 2012[/editline] Actually, you probably don't even need to do any of that, just return true in SWEP:DoImpactEffect if the hit entity was a player. Otherwise, return false for the default impact effects.
Oh i had no idea that hook existed. Still, i need to override more than the effect, i need to make it not draw decals which is impossible from what i've seen. Bullets will always draw decals on whatever they hit which is the main issue. e: Damn this looks just like normal bullets now. Thanks. All i have to do is make water splash properly when i shoot it now.
Sorry, you need to Log In to post a reply to this thread.