• Gravity Hull Designator [Localized Physics] - new thread
    73 replies, posted
[B]The old thread got locked because of the post count limit. Here's a link if you need one of the old posts: [url]http://facepunch.com/showthread.php?t=1085630&p=29623508&viewfull=1#post29623508[/url] Unfortunately the good people at facepunch didn't think it useful to allow editing or quoting of locked thread posts, so I can't get the BBCode for the original post nor can I add a link to this one in the old thread. I don't have a lot of time right now, but I'll reproduce the original post as best as I can over time, beginning with a straight copypasta not preserving formatting. I suppose this is my chance to reformat the OP anyway, might as well take it. For now if you want a decent-looking page, use the link to old thread.[/B] [B]RECENT UPDATES[/B] Git Merge: Fixed tooltip text (thanks to MattJeanes being far less lazy than myself) Revision 27: Fixed the underwater system in gm13. Revision 26: Ported to Gmod 13, some infinite map fixes, physghosts also should work now. Revision 25: Fixed smartsnap in infinite maps (partially), fixed spawning initially without weapons. Revision 24: Fixed hulls from erroring when broken. Added the map used for Map Repeater -- uncomment the second line in lua/autorun/gravityhull_init.lua in order to enable it. Revision 23: Stopped maprepeat from loading, it was breaking spacebuild even in unaffected maps. Revision 22: SUBMARINES YEAHHHHH • added the prealpha maprepeat code-- don't use it yet though. • fixed players in hulls being invisible underwater. • fixed players in hulls having incorrect lighting (sort of). • stopped the water warp effect from being visible when in a hull. • increased the minimum distance for water fog while in a hull. if you're updating from an early revision, I recommend scrolling down and looking at r12, r17, and r20, they're awesome. Well, here it is, a thread for my localized physics mod, currently in BETA. It was announced a four hours back in waywo by a friend, who posted it for me due to my lack of a facepunch account. Obviously I have one now and I decided to just go ahead and make a thread for it. A lot of people say it has the potential to change gmod forever, and I agree if only because that's what it's designed to do. Most of what it does is explained in the videos, so I'll refrain from babbling and just let you see for yourself. NOTE: In video 1, it says the transitions are problematic. They are not anymore, as you can see in video 3. These were recorded with a couple days inbetween so things have changed for each video. VIDEO ONE IS OLD. Most of the bugs mentioned in the video have been fixed by now, including velocity. The third video was made today so it gives a much better idea of the state the mod is in, but I posted the old video anyway since it explains what the mod does and how it works, and those two things have not changed. I'll probably make a new all-in-one video when the beta is released. [media]http://www.youtube.com/watch?v=jbOHCopCyiU[/media] [media]http://www.youtube.com/watch?v=56j7jaEtDTc[/media] [media]http://www.youtube.com/watch?v=xn4bDLPY69Q[/media] [b]DOWNLOAD[/b] It's been a while since I updated this page, but the new thread kind of brought some issues with the page to light. For quite a while now this page has recommended using SVN while there is actually a more up-to-date GIT repository for the mod. I'm not sure how to explain to you how to use Git if you don't know, but the link is here: [url]https://github.com/superllama/gravityhull[/url] You can also still download the mod from the googlecode SVN repository at [url]http://gravityhull.googlecode.com/svn/trunk/[/url] - see [url]http://wiki.garrysmod.com/?title=SVN[/url] for information about using SVN if you don't already know. [B]What defines the hull?[/B] The interior of the hull is defined as the set of locations where there is a floor under you, and if the point's elevation from the floor exceeds the vertical protrusion factor, it also requires at least one non-floor (a wall or ceiling). [B]What this ISN'T:[/B] • NOT a module, the mod is made entirely with lua and has no dependencies. • NOT a reimplementation of source physics, it's a complex illusion that involves a room in the middle of nowhere. • NOT a wall walking mod, though it can be used on something and then rotated 90 degrees so that down is now the wall. • NOT a spherical planet mod. "Down" inside the ship is defined as the orientation gravity was pulling when the tool was first used. Spawn a dumpster, shoot it, flip it upside-down, and you're on the ceiling. • NOT a way to stick to things. Again, down is only one direction internally and you cannot walk around the inside of a ring unless you make it out of multiple hulls, each with their own down. This might be made easier in the future. • NOT a map entity. I might make a map entity later on that allows the effect to be present, but for now it's just something you build with. • NOT a collision engine. This mod uses nothing more than source's built-in havok implementation, but it sure fools it a lot. Many shortcomings of havok are avoided by making it think something different is happening. [B]What this mod IS:[/B] • a localized physics environment for any contraption, essentially behaving as if each hull was its own map. • a tool that anyone can use on any set of welded props that has a clear interior and exterior. • the first and only complete spazz protection for ships. Since the ghost doesn't move, entities inside cannot be thrown through the wall. NOTE: In the future there will be a slider to control how much entities are thrown around by motion, but it will be applied in a backwards manner (negative velocity to the props, not positive velocity to the ghost) to avoid wallclipping, so even a 0% dampener will still stop spazz deaths even though it will throw things around just as much as before. • a separate area with its own sense of "down." Gravity's internal direction is defined when you first designate your hull, and does not change relative to the ship's rotation. • a stabilizer for pretty much any vehicle you can think of. Boats are especially interesting with the tool applied, because you actually rock back and forth in the water. • linked with the outside world as seamlessly as possible-- the physgun behaves properly for the most part, and you can toolgun entities on the outside while you're inside a hull, as well as press buttons/get in chairs. • an override of many built-in functions such as GetPos, so there is a chance that your favorite mod might work with it already without any changes. • a very convincing illusion. You're not actually in your ship, but it sure looks like you are. For this reason a lot of things (manhack lights for example) might render in the wrong place. But hey, a video game is just an illusion too, so who cares. • a simple change brought on by extremely non-simple code, that can revolutionize almost everything else that's already possible with the simple addition of walking in a moving object and gravity being affected by rotation. [B]FAQ[/B] Q: My contraption isn't working, it says it was designated but it isn't! A: Does it have walls or a ceiling? If not, you need to increase the Vertical Protrusion Factor. Q: Does this work with spheres? A: Not in the way you're asking. Q: Does this work with <<SUBJECT ADDON HERE>> A: Maybe; depends on what the addon does. There may or may not be conflicts and there's a decent chance it won't work inside the hull, but lots of mods do. It's a matter of overriding the right things and I plan to fix as many of these as I can. Q: I just want to fly a spaceship, I don't want people running around climbing walls like spiderman. A: They can't. The only way you can walk on a wall is by making a "ship" and rotating it so that its floor is on the wall (or designating the wall with hit surface defines floor checked)-- it's not just a "climb wherever you want" deal. [B]Want to give me a little push?[/B] Modding is a labor of love, but it doesn't make any money, and neither does anything else I do. Therein lies the problem with
Could it be possible to implement a second mode which allows you to select individual parts on a contraption? Otherwise, thank you for this mod.
[QUOTE=ORT451;39949752]Could it be possible to implement a second mode which allows you to select individual parts on a contraption? Otherwise, thank you for this mod.[/QUOTE] Yeah, that's been suggested a lot-- the main problem with it is the fact that hulls grow and shrink as you add or remove props so even if you start with one prop and add more onto it, the hull covers the whole ship. The reason for this is I'd always imagined having GHD'd ships flying around and getting parts destroyed by weapons, and the engineers on board having to replace the part while it's still moving. Plus I always wanted people to be able to make modifications to their ship without having to disable the gravity hull. Most of the benefits of having individual prop GHD support is that you can make a single ship with multiple gravity vectors-- but you can already do this since the hull expansion mechanism never overtakes a prop that's already been claimed. It'd probably be easier to come up with a solution if I knew the reason for suggesting the feature-- there might be a solution that works better with both the code and the problem than just having another mode that makes a different kind of non-expanding single-prop hull. One possibility would be the option to exclude specific props and prop chains from the GHD rather than including them-- this would allow the hull expansion code to run normally but have a way of stopping it.
You should definitely embed the videos in the OP so people realize what this really is.
Damn this is cool
WHY YOU NO WORKSHOP?
I opted not to use the workshop for the same reason wiremod did-- issues with licensing and intellectual property along with the fact that it's harder to update than a simple SVN. I hope it's not too inconvenient.
I have never used this mod and probably never will - it looks cool though so have some free money.
I was wondering if I could possibly use and edit your addon for another game mode called Community Roleplay? I want to make some type of train entity and use your script to keep players on. This is all an idea though.
That server list is about two years old, you should just remove it. Or at least the one about me.
[QUOTE=KillerLUA;39958773]I have never used this mod and probably never will - it looks cool though so have some free money.[/QUOTE] Thanks, I appreciate it. Always nice to have a free meal. [QUOTE=Bletotum;39959355]That server list is about two years old, you should just remove it. Or at least the one about me.[/QUOTE] Good point, I completely skim over that every time I look at the OP, just removed it. [QUOTE=find me;39958947]I was wondering if I could possibly use and edit your addon for another game mode called Community Roleplay? I want to make some type of train entity and use your script to keep players on. This is all an idea though.[/QUOTE] Technically if the gamemode doesn't have a toolgun, you can just install Gravity Hulls as they already are and then call the right functions from inside the gamemode-- just look at localphysics.lua in the toolgun folder of my mod to see how it sets up hulls. If you need to, you can remove the entities folder from my mod and just use the autorun code-- it'd be best if you could keep my addon separate though and make it a dependency rather than just taking the code out of it-- that way any bugs I fix will be fixed in your application of the mod as well provided people keep it up to date. If you really have to though, just use my autorun and gravityhull script folders and leave the file structure intact as best you can, taking out the entities folder and stuff. Also make sure I'm properly credited if you do have to take my files and put them in your gamemode folder. Again, I'd prefer it if you just kept my mod as a dependency and then made any changes to it in the form of overrides in your own autorun code-- you can wrap functions or even replace them the same way I do with sandbox functions in my code. EDIT: Of course if you're not the developer of the gamemode and you're just running a server and want to make two existing mods working together, you can do whatever you want with it. I just don't want a publicly available gamemode to include a lot of files from my mod if it's possible to just leave them separate.
[QUOTE=SuperLlama;39960460] Technically if the gamemode doesn't have a toolgun, you can just install Gravity Hulls as they already are and then call the right functions from inside the gamemode-- just look at localphysics.lua in the toolgun folder of my mod to see how it sets up hulls. If you need to, you can remove the entities folder from my mod and just use the autorun code-- it'd be best if you could keep my addon separate though and make it a dependency rather than just taking the code out of it-- that way any bugs I fix will be fixed in your application of the mod as well provided people keep it up to date. If you really have to though, just use my autorun and gravityhull script folders and leave the file structure intact as best you can, taking out the entities folder and stuff. Also make sure I'm properly credited if you do have to take my files and put them in your gamemode folder. Again, I'd prefer it if you just kept my mod as a dependency and then made any changes to it in the form of overrides in your own autorun code-- you can wrap functions or even replace them the same way I do with sandbox functions in my code. EDIT: Of course if you're not the developer of the gamemode and you're just running a server and want to make two existing mods working together, you can do whatever you want with it. I just don't want a publicly available gamemode to include a lot of files from my mod if it's possible to just leave them separate.[/QUOTE] Yep I completely understand where you are coming from. I want to make it a dependency for a type of train mod that will automatically apply your physics mod to the floor so players can jump on a working train in game, ect, ect. This is for a public gamemode I'm currently working on, so I would keep all your work in a separate spot with your credits at the top of each page. Mainly I want to use the mod as a learning experience but not only that, added to a train entity would make for one hell of a train mod in a roleplay game. If you are curious about the gamemode it is Community Roleplay, in this forum somewhere. Also this might not be added anytime soon as right now it is all just concept. But I do appreciate the kindness of letting me work around you mod.
[QUOTE=find me;39960901]Yep I completely understand where you are coming from. I want to make it a dependency for a type of train mod that will automatically apply your physics mod to the floor so players can jump on a working train in game, ect, ect. This is for a public gamemode I'm currently working on, so I would keep all your work in a separate spot with your credits at the top of each page. Mainly I want to use the mod as a learning experience but not only that, added to a train entity would make for one hell of a train mod in a roleplay game. If you are curious about the gamemode it is Community Roleplay, in this forum somewhere. Also this might not be added anytime soon as right now it is all just concept. But I do appreciate the kindness of letting me work around you mod.[/QUOTE] No problem. I'd still look into keeping my code as is in addon form and strictly using overrides and calls though, if that's possible for you. You wouldn't need to include any of my code in the gamemode folder that way, people could keep it up-to-date separately with their svn/git routines, and all you'd really need to do is wrap all GHD-requiring code and wrappers with "if GravityHull then" in your code. Plus, if you can manage to implement GHD usage without moving any of my code into your project, you don't even need to credit me for it-- you can just say in the gamemode's description "best played with Gravity Hulls installed" or something like that. Also feel free to steal anything out of the STOOL's code if you do that, it's not always clear how my functions need to be called and obviously if you want to take the strict calling/overriding approach you'll have to probably look at how the functions are called by the regular implementations. EDIT: Looking at this old OP makes me realize how little attention I've paid to the public image of the mod, lol. So much information on that first post is extremely outdated and I'm a little embarrassed that it was still up there. One thing I don't know if everyone noticed is there is now a github page for GHD if you want to help out with code contribution and fixing small errors or adding compatibility for mods, available here: [url]https://github.com/superllama/gravityhull[/url] I also feel like there needs to be a new video for the first page... maybe I'll get around to it myself, but if anyone else wants to give it a shot, there's a good chance it'll end up on the OP. One thing I'd like to be mentioned in the videos that isn't in any of the existing ones is Submarine support.
Protip: Never destroy the hull you're standing on. Video coming soon. EDIT: Oooookayyy, watching myself create a Hull in a demo crashes my game. :v:
[QUOTE=SuperLlama;39950891]Yeah, that's been suggested a lot-- the main problem with it is the fact that hulls grow and shrink as you add or remove props so even if you start with one prop and add more onto it, the hull covers the whole ship. The reason for this is I'd always imagined having GHD'd ships flying around and getting parts destroyed by weapons, and the engineers on board having to replace the part while it's still moving. Plus I always wanted people to be able to make modifications to their ship without having to disable the gravity hull. Most of the benefits of having individual prop GHD support is that you can make a single ship with multiple gravity vectors-- but you can already do this since the hull expansion mechanism never overtakes a prop that's already been claimed. It'd probably be easier to come up with a solution if I knew the reason for suggesting the feature-- there might be a solution that works better with both the code and the problem than just having another mode that makes a different kind of non-expanding single-prop hull. One possibility would be the option to exclude specific props and prop chains from the GHD rather than including them-- this would allow the hull expansion code to run normally but have a way of stopping it.[/QUOTE] The reason is because my game(or my PC, it's not the best thing in the world) hates it when GHD is applied to a steam locomotive. The frame rate drops like a stone when you axis a prop onto another prop that already has axis applied. Ballsockets help somewhat, but the frame rate still drops when the thing gets up to speed. I'm thinking it's a limitation of this addon, but it could also be my PC.(It's a dell laptop, laugh if you want)
[QUOTE=ORT451;40014044]The reason is because my game(or my PC, it's not the best thing in the world) hates it when GHD is applied to a steam locomotive. The frame rate drops like a stone when you axis a prop onto another prop that already has axis applied. Ballsockets help somewhat, but the frame rate still drops when the thing gets up to speed. I'm thinking it's a limitation of this addon, but it could also be my PC.(It's a dell laptop, laugh if you want)[/QUOTE] Oh, that's because of the way it treats constraints. It already only applies the hull to the prop you fire it at and other props *WELDED* to it, but it has to create internal physics ghosts for the other props that are attached without welds. That kind of framerate drop shouldn't be happening, I'll have to check that out.
Having fun ! [video=youtube;Ru-znpTlP8k]http://www.youtube.com/watch?v=Ru-znpTlP8k[/video] I know this is not what it suppose to be for, but im still having one fun time.
[QUOTE=Monoleg;40051699]Having fun ! [video=youtube;Ru-znpTlP8k]http://www.youtube.com/watch?v=Ru-znpTlP8k[/video] I know this is not what it suppose to be for, but im still having one fun time.[/QUOTE] How....did you do this?
[QUOTE=ORT451;40052670]How....did you do this?[/QUOTE] do you not know what this topic is about? its a tool called gravity hull designator, gives you the ability to do this.
[QUOTE=Hailedbean;40052795]do you not know what this topic is about? its a tool called gravity hull designator, gives you the ability to do this.[/QUOTE] I mean, how did you get the hulls to not run into each other? Unless you applied it to each plate and then welded it. edit: sorry that I don't know everything, but I thought that the way it handle's welds would make one override the other.
This is... Amazing! :)
[QUOTE=ORT451;40052670]How....did you do this?[/QUOTE] I made different hull, then I parented them together
Really? I'm surprised it worked with parenting. I knew you could do that with welds though-- the hull expansion thing doesn't encroach on another hull so if you weld two hulls together they both stay separate.
[video=youtube;d5rx71ooGRU]http://www.youtube.com/watch?v=d5rx71ooGRU[/video]
I want to thank you SuperLlama and other that may have work on this. This is realy awsome and im having a realy [URL="http://www.youtube.com/watch?v=7pZU1eX6MdQ"]fun time[/URL].
Zero Gravity, anyone? [video=youtube;CU4tbGIuRQg]http://www.youtube.com/watch?v=CU4tbGIuRQg[/video] I don't know, I think there's more potential to it rather than just gravity hulls.
[QUOTE=SuperLlama;39958581]I opted not to use the workshop for the same reason wiremod did-- issues with licensing and intellectual property along with the fact that it's harder to update than a simple SVN. I hope it's not too inconvenient.[/QUOTE] I'm confused, what does this addon have to do with copyright?
[QUOTE=Bernie Buddy;40131888]I'm confused, what does this addon have to do with copyright?[/QUOTE] Submitting work to the workshop means you concede all rights to the work and it is Valve's now and forever. In other words, you consent to getting fucked with a rake.
I'm guessing gm_flatinfinite was added by this mod? Never noticed, but just realized it. It's an awesome map, shame it doesn't work well with Wac, would love to fly helicopter onwards forever. [editline]5th April 2013[/editline] Wink, wink.
[QUOTE=Tinter;40163470]I'm guessing gm_flatinfinite was added by this mod? Never noticed, but just realized it. It's an awesome map, shame it doesn't work well with Wac, would love to fly helicopter onwards forever. [editline]5th April 2013[/editline] Wink, wink.[/QUOTE] That would be my job to fix.. haha
Sorry, you need to Log In to post a reply to this thread.