• GMod - What are you working on? July 2018 (#82)
    76 replies, posted
I took a look through your gamemode, and I noticed something I've seen a lot of: setmetatable(thing,{__index=base_class}) Can someone tell me why people tend to make a new metatable for each instance of a thing? It seems to me like it uses (a little) more memory, and more importantly, you can't tell if two things are of the same type with getmetatable(thing1) == getmetatable(thing2) Why is this so common? Also, progress, I guess. Entering/leaving text, using bobbleheadbob's zones. https://youtu.be/2_38l351wXM
It's not making a new metatable, though? Someone can correct me if I'm wrong. I just followed the OOP directions on the Wiki.
It is though, consider the following 2 scripts that do nearly the same thing: > car = {} > function car:Drive() >> print("Beep beep!") >> end > > thing1 = {} > setmetatable(thing1,{__index=car}) table: 0000000002473e40 > thing2 = {} > setmetatable(thing2,{__index=car}) table: 0000000002473d80 > print("Types?",getmetatable(thing1) == getmetatable(thing2)) Types?  false > car = {} > function car:Drive() >> print("Beep beep!") >> end > > car_m = {__index = car} > > thing1 = {} > setmetatable(thing1,car_m) table: 0000000003063740 > thing2 = {} > setmetatable(thing2,car_m) table: 00000000030634c0 > print("Types?",getmetatable(thing1) == getmetatable(thing2)) Types?  true Nearly everybody does it the first way, but it seems to me like I would want to be able to compare types of things by comparing their metatables. What's up with that?
Jesus Christ, I thought you were making fun of me for a second. :V
been working on a simple printer for a community. Excuse the video quality https://i.gyazo.com/88c00a2b6a531074b381c9e21b3fa1d0.mp4
Not really something I'm working on but more-so something I found out while working on something I am working on. Anyway, turns out TTT used to play some disgusting weapon drop animation shown below. You can see the animations that it used to use here. ACT_ITEM_PLACE was renamed to ACT_GMOD_GESTURE_ITEM_PLACE and the TTT code was never updated so the animation was lost whenever that update happened. https://www.dropbox.com/s/gzg0ozd0pyp140x/2018-07-28_21-43-35.mp4?dl=0 If you ask me, good riddance.
I am at the moment working on some essentials for darkrp i am going to do a incap system where if you are under 20 hp you are forced to crouch and it calls a medic automatically and a medic comes and heals you i am also working on a police armory right now that will include weapons, ammo, armor, health https://i.imgur.com/Sa9CRiW.png the empty space will be armor i am atm getting a ui done and a model for it any suggestions please post!
Currently I'm working on dialogue with NPC https://files.facepunch.com/forum/upload/303163/f90bf9ec-ff4c-4a78-b622-20d3093abbfe/2018-07-29_11-40-53.mp4
I remember when this was a thing. I think it was lost when GMod 13 was released (when everything else broke). In my opinion that animation isn't needed and is kind of annoying
https://files.facepunch.com/forum/upload/110874/b9792837-edaa-469c-afa6-fabcdb32440c/image.png I'm quite close to testing some of the projects I'm working on, but how do I know if they'll work in real world usage? Simple! Just painfully construct your own sentry client from scratch using a third party module! Unfortunately I can't really do a lot of the things that make Sentry really useful like capturing which user caused this error and what the current state of the server is because gm_luaerror runs its hooks in a separate context but maybe if OnLuaError was available on the server (hint hint) I'd be able to do more. Release pending me adding all the things Sentry demands like "rate limiting" and "not spamming their servers"
hey ya'll shameless promotion, but I just released the gamemode me and a bunch of dorks have been working on for a while. Jazztronauts!! It's got a lot of really juicy bits of tech you all might be interested in, including: Trolley bustin' through Stealing prop_physics, prop_statics, and even world brushes An integrated map I/O activity viewer (hacker goggles) An in depth dialog system that supports full cutscenes and animations Lots of fucking garbage and pretty art Here's a lil' trailer that show you absolutely nothing https://www.youtube.com/watch?v=BT6Ds_K2vhU of course, all the code is on github https://github.com/Foohy/jazztronauts
I'm here with my monthly update on "Minecraft-in-Gmod" tech. World loading/saving now works. The save format probably takes up an order of magnitude or two more space than my network compression, but it is extremely simple and should ensure compatibility between different library configurations and versions. I've started work on a converter program, which includes primitive importers for Fortblox and Minecraft. I have two more importers planned, which should be significantly more impressive if I can get them to work. http://tmp.bz/lgtKNG5kj4.png http://tmp.bz/lhbA7wzmWA.png http://tmp.bz/li6ARCh9a5.png http://tmp.bz/ljrTliVgRy.png
What wauterboi has been working on: doing literally anything with envmaps I thought it would be cool to set the $envmap of a material to a rendered target... not possible I thought it would be cool to copy render target information to the generated envmap texture itself... not possible I thought it would be cool to translate the generated envmap texture itself... not possible Status: waste of time
So you are telling me using render target for realtime cubemaps isn't gonna work? I was gonna waste my time on that subject, now I am curious if I should even bother trying
It wouldn't be a lost cause if you could actually make an Environment Map texture yourself. Any attempts to create render targets in that format will cause the game to spit an error message and ignore your creation code. Any attempts to hijack an existing cubemap as a render target will crash your game. Any attempts to switch out cubemap textures with render target textures just flat out fail - it is equivalent to disabling cubemaps.
It's that time again
Sorry, you need to Log In to post a reply to this thread.