A while ago I claimed that between me and Backslash we'd come up with
a hack of sorts to do gravity. Since we're not actively working on it, I figure
it's better to explain how it worked and should function, and perhaps the
general populace can refine the idea further. Rather than reiterate the idea,
I'll just repost my log with some edits.
Please note the dates, and if there's questions I can probably mentally chew on them
for a bit. It was a round-a-bout way that I came to the idea, but we've got lots of those.
Also, I think GravCube would be a great name for the end product. ^_^
11/23/08
(1:04:57 AM) JGZinv: hmm
(1:05:09 AM) Backslash: hm?
(1:05:34 AM) JGZinv: can your tractor beam have variable intensity ?
(1:05:51 AM) JGZinv: or double up the effect if two are used?
(1:06:19 AM) Backslash: yes
(1:06:44 AM) JGZinv: then I figured out gravity I think
(1:06:59 AM) JGZinv: simplcity is rather funny that way
(1:07:13 AM) JGZinv: got this off the chat ideas, and some HLP stuff
(1:07:32 AM) JGZinv: but set your invisible nav or waypoint
(1:07:53 AM) JGZinv: also spawn a cube...orb...whatever ship there
(1:08:02 AM) JGZinv: also invisible due to textures
(1:08:21 AM) JGZinv: have one tractor set to a 360 degree FOF
(1:08:28 AM) JGZinv: with long range
(1:08:37 AM) JGZinv: then have another set to shorter range
(1:08:38 AM) Backslash: and the beam itself invisible
(1:08:44 AM) JGZinv: that'd work
(1:08:49 AM) Backslash: yeah very nice
(1:08:52 AM) JGZinv: once you keep going closer
(1:09:01 AM) JGZinv: the effect doubles triples whatever
(1:09:10 AM) JGZinv: and sucks you in faster ^_^
(1:09:21 AM) JGZinv: walla.... Tach gravity ala mod
(1:09:40 AM) Backslash: heh. well now lets see if we can make invisible beams
(1:09:51 AM) JGZinv: pure black texture?
(1:09:52 AM) Backslash: then I'll ask karajorma if he wants my tractor beam code
(1:09:57 AM) JGZinv: or was that green...
(1:10:05 AM) Backslash: not sure
(1:10:25 AM) JGZinv: either way... beam color is least of our worries probably
(1:10:44 AM) JGZinv: is you could set it up with several tractors
(1:11:08 AM) JGZinv: the jump between beam fields would be less noticable
(1:11:39 AM) Backslash: oooh, even better... beam damage attenuation. I might be able to do that pretty easily based on some old code that phreak tried to get working
(1:11:40 AM) JGZinv: although this'll be interesting trying to escape the gravity well so to speak
(1:11:52 AM) JGZinv: attenuation?
(1:12:20 AM) Backslash: the beam 'damage' (in this case pull) gets weaker as it is further away
(1:12:24 AM) JGZinv: ah
(1:12:34 AM) JGZinv: yeah that'd do basically the same in reverse
(1:13:24 AM) JGZinv: only thing is I think to get best use out of this
(1:13:33 AM) JGZinv: you'd need some FRED modification
(1:14:03 AM) JGZinv: maybe some object edits so someone can drop in a "gravity well"
(1:14:21 AM) JGZinv: which is just a tractor'ed up invisa-cube
(1:14:44 AM) Backslash: hrm, wonder how many weapons on it we'd need to make it work well in multiplayer
(1:14:55 AM) JGZinv: worth testing though
(1:15:03 AM) JGZinv: depends on how FOF works too
(1:15:22 AM) JGZinv: if beams go through the "hull"
(1:15:29 AM) JGZinv: wouldn't be near as bad
(1:15:41 AM) Backslash: true
(1:16:09 AM) Backslash: hopefully we can force it to fire at more than one ship at once
(1:16:15 AM) JGZinv: hmm
(1:16:20 AM) JGZinv: multipart turret?
(1:16:29 AM) JGZinv: X like 8 turrets
(1:17:06 AM) JGZinv: figuring you have 6 sides to deal with
(1:17:12 AM) JGZinv: 48 turrets
(1:17:36 AM) JGZinv: hmm therein lies a problem too
(1:18:06 AM) JGZinv: if you have too many turrets all set to long range... it's going to be a instant yank more than a gradual build up
(1:18:22 AM) Backslash: true, getting only SOME turrets firing at the same ship at once
(1:18:41 AM) Backslash: heck either way this'd look cool with visible beams. laser light show
(1:18:48 AM) JGZinv: yeah... 2 long range... 2 med long range...2 med... 2 short
(1:19:07 AM) JGZinv: with stepped area of effect length
(1:20:16 AM) Backslash: if we're really really lucky, the fire-beam sexp won't care which ship is targeted
(1:20:39 AM) Backslash: in which case we'd only need 1 turret per range increment
(1:20:43 AM) JGZinv: I'd think it'd go after whatever it can get
(1:20:56 AM) JGZinv: but that's me... not a coder talking
(1:21:21 AM) Backslash: we're probably both right and wrong in various ways... I may be a coder but I dunno as much about FRED or weapons, yet :-P
(1:21:43 AM) JGZinv: well it's an idea
(1:21:52 AM) JGZinv: unless you want me to go post it at HLP
(1:21:58 AM) Backslash: I like the idea
(1:22:44 AM) Backslash: for simplicity you could leave out the tractor beam idea and just ask if a beam could be made to fire at multiple ships at once
(1:23:19 AM) JGZinv: how bout an always on beam instead?
(1:23:33 AM) JGZinv: I think Nuke said that was already doable
(1:23:44 AM) JGZinv: back when we talked about lightsabers in FS2
(1:24:00 AM) Backslash: well if the refire rate is very low, probably, yeah. unless he had a different method
(1:24:10 AM) JGZinv: basically that...
(1:24:29 AM) JGZinv: super high refire... so there wasn't a noticable shut off
(1:24:36 AM) JGZinv: no energy cunsumption
(1:24:46 AM) Backslash: heh now all I need is the knowledge of how to make invisible models. also how to add turrets to ships.
(1:25:00 AM) JGZinv: we covered invis models too
(1:25:26 AM) JGZinv: adding turrets... I'd like to know as well but it's either in PCS2, Max, or Truespace
(1:25:34 AM) JGZinv: take your pick
(1:25:45 AM) Backslash: I prefer the first to
(1:25:47 AM) Backslash: *two
(1:28:12 AM) JGZinv: set it up your way far as you can
(1:28:18 AM) JGZinv: then ask a person to turret it
(1:28:48 AM) Backslash: true
(1:31:37 AM) JGZinv: That's because you haven't finished the texture. Unless you apply a texture to it and have one of the same name in your data/maps directory, the game will read it as invisible. If you want to just see the ship. Make a small (maybe 16X16?) square of a single color, name it 'HappyPants' or whatever you want, apply it to the object in truecrap and then save it as a .pcx in your maps folder. When you go in game, your modded ship should be just the model painted in a single color. I personally use red or gray but other colors might work for you.
(1:32:15 AM) JGZinv: so just don't apply a texture
(1:32:19 AM) Backslash: hahaha
(1:34:24 AM) JGZinv: btw main reason I said to stick a waypoint or whatever with it
(1:34:30 AM) JGZinv: was that if you wanted to...
(1:34:38 AM) JGZinv: we could make it work like a powerup
(1:34:58 AM) JGZinv: based on the distance from the waypoint... it could change the beam intensity
(1:35:07 AM) Backslash: hm!
(1:35:10 AM) JGZinv: but that seems like the harder way now
(1:36:21 AM) JGZinv: on player ship distance 45
- change beam intensity 80%
(1:36:32 AM) JGZinv: or whatever the SEXP equivalent
(1:36:38 AM) Backslash: true. at least we have options to try!
(1:36:50 AM) JGZinv: yeah 2 ways... that should work
(1:36:59 AM) JGZinv: worst case on the beam lock
(1:37:13 AM) JGZinv: is you pile a bunch of these things together
(1:37:22 AM) JGZinv: so they are each their own ship
(1:37:33 AM) JGZinv: so they can lock on to more than one thing
(1:41:17 AM) Backslash: will take a lot of fiddling I can tell, but still, it's something to try!
(1:41:23 AM) Backslash: I'm madly table editing right now
(1:41:55 AM) JGZinv: for this or something else?
(1:42:12 AM) JGZinv: this sound right for the post?
(1:42:13 AM) JGZinv: Basically we need to figure out:
A. Can a beam from an AI controlled ship target multiple other ships at once?
B. If not, would a 360 degree FOF with an always on type refire rate essentially do the same thing?
C. If A is good to go, how can we go about implementing it?
(1:43:55 AM) JGZinv: eh scratch C
(1:45:02 AM) JGZinv: meh posted
(1:46:17 AM) Backslash: yeah, table editing for testing this. stand by
(1:46:23 AM) JGZinv: k
(1:46:34 AM) Backslash: gonna start with just automatically firing at everything in sight
(1:46:43 AM) JGZinv: oh yay
(1:47:00 AM) Backslash: see what that looks like, for one thing.... light show :-D
(1:47:08 AM) JGZinv: rave in space
(1:47:15 AM) JGZinv: next week on JAD
(1:47:33 AM) Backslash: yeah really
(1:47:57 AM) JGZinv: btw beams can target multiple points on one target
(1:48:05 AM) JGZinv: so eh... sorta there
(1:48:15 AM) Backslash: yeah I've seen it do that
(1:48:39 AM) Backslash: oh crap... hopefully that won't mess too much with the direction of the pull
(1:48:55 AM) JGZinv: pull inward....
(1:53:34 AM) JGZinv: seemed to fit some of our questions
(1:53:36 AM) JGZinv:
http://www.hard-light.net/forums/index.php/topic,51903.msg1066706.html#msg1066706(1:55:31 AM) Backslash: well I've got half the battle done... the turrets are invisible but they don't fire yet
11/23/09
(10:14:53 PM) Backslash: yar! it works but only sort of. So far I've only got it to shoot at the player, but that's a start. Looks like crap... contrary to what I had expected, the beam doesn't 'track' the target so it fire lots of separate beams as the player moves. but eh, all that should be invisible eventually, right?
(10:31:40 PM) JGZinv: yo
(10:31:54 PM) JGZinv: wanted to yak at ya anyway
(10:31:59 PM) Backslash: ah good
(10:32:02 PM) JGZinv: did you see the topic?
(10:32:05 PM) Backslash: yep
(10:32:08 PM) JGZinv: ok
(10:32:24 PM) JGZinv: did you try the other way with the 360 FOF always on?
(10:33:02 PM) Backslash: yeah... it mostly doesn't work, or at least, it works but looks horrible.
(10:33:11 PM) Backslash: hopefully a few code tweaks will help
(10:33:14 PM) JGZinv: looks can always be changed
(10:33:21 PM) JGZinv: we just want it to work
(10:33:30 PM) Backslash: it causes ships hit by beams to shudder and rotate as well as get pulled in
(10:33:40 PM) JGZinv: sounds good to me....
(10:33:46 PM) JGZinv: y4 it a problem?
(10:34:03 PM) JGZinv: that seems like the beam thwack in the beam table is having the effect
(10:34:21 PM) JGZinv: set thwack to 0.... won't do that
(10:34:30 PM) Backslash: well the shudder and rotate isn't 'regular'... goes in all sorts of directions
(10:35:05 PM) Backslash: and uh... I'll look into that, but afai remember that's how I was applying the pull in the first place
(10:35:13 PM) JGZinv: ahhh
(10:35:39 PM) Backslash: but yeah, it mostly works. my first time I rofled because I immediately got pulled into the center turret and died because of such a fast collision
(10:36:18 PM) JGZinv: well that's the idea if you're really close... but I get what you're sayin
(10:36:31 PM) JGZinv: were you able to break out of it?
(10:36:45 PM) Backslash: not the first few times, no
(10:36:51 PM) JGZinv: or is an impossible task to break the gravity so to speak
(10:36:54 PM) Backslash: I'm trying to tweak the strength
(10:37:14 PM) Backslash: recently tweaked it too much the opposite way so there wasn't enough gravity
(10:37:26 PM) JGZinv: wonder how this would affect caps
(10:37:41 PM) JGZinv: like in the wing commander movie
(10:37:47 PM) Backslash: hmm good question
(10:37:48 PM) JGZinv: with the kilrathii crusier
(10:38:16 PM) JGZinv: make a black hole graphic... a big "grav cube" set up like this
(10:38:23 PM) Backslash: I suspect it will not affect them as much as we wish it would, since they have such higher mass
(10:38:30 PM) JGZinv: when it gets close enough it looses health
(10:38:46 PM) JGZinv: yeah but really it should work that way
(10:38:54 PM) JGZinv: technically for big ships
(10:39:00 PM) JGZinv: appearance wise
(10:39:24 PM) JGZinv: they have the engines to push through an arena of low gravity like most of space
(10:39:30 PM) Backslash: true
(10:39:33 PM) Backslash: didn't think of it that way
(10:39:36 PM) JGZinv: high gravity we could do in cutscenes
(10:39:45 PM) JGZinv: with really high values
(10:40:06 PM) JGZinv: what you need is almost an immunity to beams flag
(10:40:20 PM) JGZinv: so fighters or big ships could plow right through it
(10:40:35 PM) JGZinv: but only effect a group you didn't want protected
(10:41:15 PM) Backslash: the visual effect is currently not what we want (not that it matters) but does look pretty cool, almost Borg scanning like
(10:41:24 PM) Backslash: yeah
(10:41:30 PM) Backslash: all jumped in at once
(10:42:13 PM) JGZinv: maybe someone can use it as is...
(10:42:44 PM) Backslash: well as is still needs code changes to have the tractor/gravity part actually work
(10:42:59 PM) Backslash: but yeah, I'll see if karajorma would like me to commit that to his branch
(10:43:17 PM) JGZinv: ^_^
12/6/08
(1:28:42 AM) Backslash: well it doesn't work with anything except my build which is buggy
(1:29:10 AM) Backslash: but that's a matter of time.
(1:29:12 AM) JGZinv: the build or the cube?
(1:29:15 AM) JGZinv: is buggy
(1:29:32 AM) Backslash: the build
12/9/08
(1:55:17 AM) JGZinv: not sure quite what you need done with it
(1:55:45 AM) JGZinv: besides the whole works-on-my-build-only bit
(1:56:03 AM) Backslash: yeah it's mostly just porting the code changes I've done from the old unstable HEAD build to the latest 3.6.10 branch
(1:56:38 AM) JGZinv: ah... so partly the code freeze too I'd imagine
(1:57:36 AM) Backslash: yeah
(1:57:53 AM) JGZinv: blah
(1:58:11 AM) Backslash: once my changes are in place, all the cube is is a gun that fires beams at you :-P
12/16/08
(1:53:22 AM) JGZinv: kara said he was interested in our gravity
(1:53:29 AM) JGZinv: though I've not told him how we did it
(1:54:38 AM) JGZinv: I think he's thinking we came up with some uber complicated method
(1:54:49 AM) JGZinv: as he want's to stick it in the galactica
(1:54:56 AM) JGZinv: for carrier landings
(1:55:06 AM) Backslash: well technically it is more complicated than it should be :-P
(1:55:18 AM) JGZinv: unless he does staggered grav cubes
(1:55:28 AM) JGZinv: I don't think it'd work for that application off hand
(1:55:35 AM) Backslash: I agree
(1:56:00 AM) JGZinv: if you built them into the hull and defined them only to activate on a certain event like landing
(1:56:16 AM) JGZinv: they maybe... it'd work out... but it'd be a pain either way
(1:56:17 AM) Backslash: I'm hoping that once he sees how we did it, he can make a new sexp that does the same thing as what the beam does without the bad sideeffects.
(1:56:33 AM) Backslash: cause we're kind of bunging the whole chicken at the problem when an egg might do