3D combat surface walking
Post Reply
Quote
Re: 3D combat surface walking
Posted by parakeet on Mon Jun 4th at 10:47pm 2007


How do you take into play running and jumping? would you curve around the surface or would you take the last position that you had gravity point.



Quote
Re: 3D combat surface walking
Posted by Stadric on Tue Jun 5th at 12:10am 2007


You could apply gravity periodically or throughout a jump from one section of the curve to the next. The direction of the force of gravity would be relative to your position.
You could do that by tracing perpendicular lines to the surface and whichever intersects an object's center of mass first would get dibs.



Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying



Quote
Re: 3D combat surface walking
Posted by Bewbies on Tue Jun 5th at 12:26am 2007


I think I've got a good idea of how this can be pulled off with hl2.. even as a mod. (Especially looking at portal..)

Certain surfaces could be surrounded by a bush entity, like a trigger, that direct applied gravity and view. Doing this gives the mapper control over where, when, and how extreme the force is. Hell, just associating the player's view with gravity could make for some really cool sequences.. like if some device is pulling the player toward it, it would plant the player on his back or belly, making him helpless unless he finds something to grab onto.

A "hold player to surface" brush would direct this force to the face normal that the player is touching.. (i think that's the right terminology? im no coder.) It would look at the face's angle in relation to "0 0 0", and apply it to the player. I hope I'm making sense.

Anyway, using a brush entity.. the mapper could build this aspect into surfaces to.. let's say, 8 feet above the surface. This would give the player a means of escaping the gravitational pull, and being caught be an entirely other force. Imagine jumping from the floor, turning upside-down, and landing your feet on the cieling. Frickin' sweet.

Edit: I'm gonna make a diagram.. I'm getting myself all excited just thinking about it.




the players tried to take the field
the marching band refused to yield



Quote
Re: 3D combat surface walking
Posted by parakeet on Tue Jun 5th at 1:34am 2007


It can be pulled off in hl2, think of dystopia, they've already got for the most part a working version of this for the hackers. It's quite cool.

It would take some really slick coding, but definitely could be done



.else /me ~kill you
www.arclan.net



Quote
Re: 3D combat surface walking
Posted by mazemaster on Tue Jun 5th at 10:28am 2007


I was leaning towards Stadric's idea of calculating the gravity based on the nearest surface. Give the mappers a certain "this surface pulls the player" texture, and calculate based off that.

I think it would be better to do the calculation by the position of the feet instead of the center of mass though - with the surface nearest to the center of mass, it could be really problematic for rooms with short ceilings, or angled paths that cross closely - all of a sudden you are pulled to the "wrong" surface.

Bewbies idea of a brush that defines where gravity is applied is a cool idea as well, but I am afraid that it might become very tedious mapping-wise to make all the gravity brush volumes.




Quote
Re: 3D combat surface walking
Posted by Junkyard God on Tue Jun 5th at 10:47am 2007


What's wrong with it being tedious <img src=" SRC="images/smiles/icon_smile.gif"> that's what level design in general is, a tedious job :P
Now we don't have to worry about triangle terrain in hl1 we can just go do other anoying and frustrating jobs eh <img src=" SRC="images/smiles/icon_biggrin.gif">



Hell, is an half-filled auditorium



Quote
Re: 3D combat surface walking
Posted by wil5on on Tue Jun 5th at 1:23pm 2007


As far as gravity goes, some sort of volumetric mass calculation and proper gravity equations would be fun to experiment with, but probably wouldnt work too well in a real time game (though you could hack something pretty good with enough understanding I suppose).


&quot;If you talk at all during this lesson, you have detention. Do you understand?&quot;
- My yr11 Economics teacher



Quote
Re: 3D combat surface walking
Posted by Junkyard God on Wed Jun 6th at 7:19pm 2007


Maybe it could be done like in portals, but just adjust the gravity per client as the user changes from floor, to wall ,to ceiling.

Portal has the views going correctly etc. I'm sure its possible to adjust the gravity and physics settings to make it work.

One prblem though... what if someone shoots a prop barrel or whatever at someone else?

what way would debris fall of a plank that breaks?



Hell, is an half-filled auditorium



Quote
Re: 3D combat surface walking
Posted by Stadric on Wed Jun 6th at 10:12pm 2007


I can't think of a way my method wouldn't work for that, JG.


Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying



Quote
Re: 3D combat surface walking
Posted by wil5on on Thu Jun 7th at 12:12pm 2007


Portal has universal gravity (as far as I'm aware) so its not quite the same. If you have a method for calculating direction of gravity, it should be effective on all objects.


&quot;If you talk at all during this lesson, you have detention. Do you understand?&quot;
- My yr11 Economics teacher



Quote
Re: 3D combat surface walking
Posted by Junkyard God on Fri Jun 8th at 8:24am 2007


Portal is a neat reference for camera views though, since you can look through a portal and your map will be upside down, sideways or whatever.

You could probarbly code the physics correctly but you'd need some skilled coding monkey <img src=" SRC="images/smiles/icon_smile.gif">

I think we should see if there's people actually interesting in working on a mod like this? if we all put our hands together we might be able to find a coder willing to sacrifice 6 months of studying physics for the project :P



Hell, is an half-filled auditorium



Quote
Re: 3D combat surface walking
Posted by BlisTer on Fri Jun 8th at 9:17am 2007


lack of motivated coders has always prevented us from starting mods, but we can always hope..



Quote
Re: 3D combat surface walking
Posted by Junkyard God on Fri Jun 8th at 11:15am 2007


Yeah, I hope to learn some decent coding on my enxt college in about a year or so, I think being able to code properly would get you so much further in modding etc. than level design and/or modeling since there's so few coders out there that can really code a full mod properly.

But I think we might be able to score one if we'd make this a community project or something alike.



Hell, is an half-filled auditorium



Quote
Re: 3D combat surface walking
Posted by parakeet on Fri Jun 8th at 2:21pm 2007


I can code, but physics aint my stuff :P.



Quote
Re: 3D combat surface walking
Posted by Junkyard God on Fri Jun 8th at 2:34pm 2007


Learn you must! <img src=" SRC="images/smiles/icon_biggrin.gif"> /yoda


Hell, is an half-filled auditorium



Quote
Re: 3D combat surface walking
Posted by Stadric on Fri Jun 8th at 6:50pm 2007


F = ma
T(torque, not the period) = F/r

g=G(m1)(m2)/d2, G = 6.67*10^-11 (m3)/kg(s2)

And that's all you need to know!



Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying



Quote
Re: 3D combat surface walking
Posted by mazemaster on Fri Jun 8th at 7:31pm 2007


? quoting parakeet

I can code, but physics aint my stuff image.


Hey perfect. My physics/math is great, but my c++ isnt up to par.




Quote
Re: 3D combat surface walking
Posted by Junkyard God on Fri Jun 8th at 7:48pm 2007


? quote:
F = ma
T(torque, not the period) = F/r

g=G(m1)(m2)/d2, G = 6.67*10^-11 (m3)/kg(s2)

And that's all you need to know!


I'm s**t at math so it seems. that makes verry little sense to me <img src=" SRC="images/smiles/icon_smile.gif">



Hell, is an half-filled auditorium



Quote
Re: 3D combat surface walking
Posted by Stadric on Sat Jun 9th at 1:10am 2007


Force is mass times acceleration, measured in Newtons (kilogram meters per seconds squared)

I can't remember the units for Torque, maybe Mazemaster does, but
Torque is Force over the radius which the object is rotating with.

and the force of gravitational attraction between to objects is the universal gravity constant (6.67*10^-11 cubic meters per kilogram seconds squared) times the mass of the first object, times the mass of the second object, divided by the distance between the two objects squared.

Don't blame me, blame Newton.



Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying



Quote
Re: 3D combat surface walking
Posted by wil5on on Sat Jun 9th at 2:22am 2007


Units for torque are newton-metres, you can figure it out from the equation.

My coding and physics are fairly good, but I dont have any time to do something like this with. I'll advise if neccessary though. Good luck!




&quot;If you talk at all during this lesson, you have detention. Do you understand?&quot;
- My yr11 Economics teacher




Post Reply