3D combat surface walking

3D combat surface walking

Re: 3D combat surface walking Posted by mazemaster on Fri Jun 1st 2007 at 7:16am
mazemaster
890 posts
Posted 2007-06-01 7:16am
890 posts 438 snarkmarks Registered: Feb 12th 2002
Has anyone yet created a FPS deathmatch game or mod that fully exploits walking on surfaces in 3D? Meaning, for example where the players might run and fight on the surface of a donut, or a mobius strip, or other similar things? Heres a quick cut-n-paste concept, to give you an idea of what I'm talking about:
User posted image

I think the gameplay potential for stuff like this is enormous, especially considering how few true gameplay innovations there have been in deathmatch since the quake/half-life/UT era.
Re: 3D combat surface walking Posted by Crono on Fri Jun 1st 2007 at 9:33am
Crono
6628 posts
Posted 2007-06-01 9:33am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
I do play Prey from time to time in DM (a.k.a. the most fun aspect of the game)

But I don't think anyone has ever gotten a complete working system with that type of thing without it becoming disorienting and rather confusing.

But, Prey is the only game I know of that's attempted it. I'm sure there's others.
Blame it on Microsoft, God does.
Re: 3D combat surface walking Posted by OtZman on Fri Jun 1st 2007 at 9:55am
OtZman
1890 posts
Posted 2007-06-01 9:55am
OtZman
member
1890 posts 218 snarkmarks Registered: Jul 12th 2003 Occupation: Student Location: Sweden
I'm thinking Prey as well, you should give it a check. I never played any multiplayer, and the singleplayer mission was just too boring so I never bothered to finish it.
What the Snarkpitters listen to!
Re: 3D combat surface walking Posted by Junkyard God on Fri Jun 1st 2007 at 12:30pm
Junkyard God
654 posts
Posted 2007-06-01 12:30pm
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
I think that if you'd have maps like on that screenie it wouldn't be confusing as you can't just wonder around the map normally.
It would be more natural to look above you, or stuff like that as the entire map seems to be composed of weird structures you can't jsut normally walk on.

In prey it feels somewhat unnatural to walk up agains a wall, but then again, it works great for aliens in NS (though they can't go along the ceiling right?).

I personally think that if some mod team puts their shoulders under such an idea it 'could' work out great, but there's soooo much new gameplay theories that come to play if you completly change the aspect of how you traverse a level.

It would be hard to balance maps an such.

I sure know i'd want to give it a go, mapping for such things must be brilliantly refreshing from the general concept that we ususaly go by in half-life etc.
Hell, is an half-filled auditorium
Re: 3D combat surface walking Posted by Andrei on Fri Jun 1st 2007 at 12:55pm
Andrei
2455 posts
Posted 2007-06-01 12:55pm
Andrei
member
2455 posts 1248 snarkmarks Registered: Sep 15th 2003 Location: Bucharest, Romania
IIRC Serious Sam : the second encounter had something along those lines. There were certain rooms in which you could walk on the walls and ceiling. An interesting idea but not exploited to it's true potential.
Re: 3D combat surface walking Posted by Juim on Fri Jun 1st 2007 at 1:33pm
Juim
726 posts
Posted 2007-06-01 1:33pm
Juim
member
726 posts 386 snarkmarks Registered: Feb 14th 2003 Occupation: Motion Picture Grip Location: Los Angeles
It would be cool, but probably a major custom modding job for source. I remember someone tried to make an Escher stairway trype map for HL1 at one time, and the problem was that you were always upright, I mean your z axis never changed. Just made all the walls func_ladders.I have Prey though and it pretty cool at times, also a bit confusing in single player mode.
Re: 3D combat surface walking Posted by reaper47 on Fri Jun 1st 2007 at 8:52pm
reaper47
2827 posts
Posted 2007-06-01 8:52pm
reaper47
member
2827 posts 1921 snarkmarks Registered: Feb 16th 2005 Location: Austria
Not an FPS, but I heard one of the next Super Mario titles tries something similar. "Super Mario Galaxy" is what it's called, I think. It has these planets you can walk around in 3D space.
Why snark works.
Re: 3D combat surface walking Posted by Stadric on Sat Jun 2nd 2007 at 12:04am
Stadric
848 posts
Posted 2007-06-02 12:04am
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
I played an RTS some time ago called Populous: The Beginning. It consisted of spherical worlds that you took over one by one. I haven't played Prey, so that's the only game I've played with or 3D surface walking or whatever you want to call it.
Here's a question. Say the level was inside of a hollow sphere, you would jump up from one side of the sphere to the other, and then get up and walk on the surface you were hurled upwards towards. But how would you calculate fall damage? From the middle of the sphere?
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: 3D combat surface walking Posted by OtZman on Sat Jun 2nd 2007 at 1:25am
OtZman
1890 posts
Posted 2007-06-02 1:25am
OtZman
member
1890 posts 218 snarkmarks Registered: Jul 12th 2003 Occupation: Student Location: Sweden
In prey it feels somewhat unnatural to walk up agains a wall, but then again, it works great for aliens in NS (though they can't go along the ceiling right?).
If I remember correctly they can go along the ceiling as well, although the view is still upright.
What the Snarkpitters listen to!
Re: 3D combat surface walking Posted by Fjorn on Sat Jun 2nd 2007 at 1:34am
Fjorn
250 posts
Posted 2007-06-02 1:34am
Fjorn
member
250 posts 25 snarkmarks Registered: Jun 5th 2004 Occupation: Student/Amateur Writer Location: California - USA
correct

IT is hard to stay on the ceiling over decor though

I'd love to see a map like that one mini planet you were on in prey though
Signature? What signature!?
Re: 3D combat surface walking Posted by Finger on Sat Jun 2nd 2007 at 1:39am
Finger
672 posts
Posted 2007-06-02 1:39am
Finger
member
672 posts 1460 snarkmarks Registered: Oct 13th 2001
Play some of the Ratchet and Clank games on ps2 (soon ps3 ) - they have had spherical worlds and 'mag boot' surfaces where you walk upside down for quite some time. I think they Prey guys were actually big fans of Ratchet games.
Re: 3D combat surface walking Posted by Crono on Sat Jun 2nd 2007 at 1:49am
Crono
6628 posts
Posted 2007-06-02 1:49am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
There's also the AvP games if you play as an alien. And Zelda: Twilight Princess to some extent (if we're just naming games you can defy gravity in)
Blame it on Microsoft, God does.
Re: 3D combat surface walking Posted by mazemaster on Sat Jun 2nd 2007 at 1:55am
mazemaster
890 posts
Posted 2007-06-02 1:55am
890 posts 438 snarkmarks Registered: Feb 12th 2002
So it sounds like it's been tried in several games, but none have yet gone all-out and fully exploited the DM gameplay possibilities of fighting on crazy surfaces - taking "cover" by walking around to the "upside down" part of what you are standing on, sneaking up on enemies from crazy angles they don't expect, fighting in 3D cave systems, etc.

I'm considering making a mod, the entire purpose of which is to expore the gameplay of stuff like this.
Re: 3D combat surface walking Posted by Yak_Fighter on Sat Jun 2nd 2007 at 2:18am
Yak_Fighter
1832 posts
Posted 2007-06-02 2:18am
1832 posts 742 snarkmarks Registered: Dec 30th 2001 Occupation: College Student/Slacker Location: Indianapolis, IN
I'm getting a headache just trying to imagine this kind of movement, especially in a fps. I could potentially see it if its in third person, where you could probably quickly figure out where you are in relation to the rest of the surfaces. I'd imagine in first person you'd be spending too much time trying to figure out your position and where you could go. Now if you were going to have traditional two walls+ceiling+floor map construction it wouldn't be a big deal at all, but things like that picture, yikes.

But I'm probably wrong and too close-minded. :biggrin:
Re: 3D combat surface walking Posted by mazemaster on Sat Jun 2nd 2007 at 2:51am
mazemaster
890 posts
Posted 2007-06-02 2:51am
890 posts 438 snarkmarks Registered: Feb 12th 2002
Remember how weird it seemed the first time you played a 3D fps, how the movement and so forth seemed strange and foreign, but then over time you got used to it? I think thats how it would be with this.
Re: 3D combat surface walking Posted by Juim on Sat Jun 2nd 2007 at 3:02am
Juim
726 posts
Posted 2007-06-02 3:02am
Juim
member
726 posts 386 snarkmarks Registered: Feb 14th 2003 Occupation: Motion Picture Grip Location: Los Angeles
Have you played Prey? I know it has been mentioned before, but it's a bit disorienting from a PC player perspective. Becuase of the limited field of view, you get lost quick and it takes some time to add the 2 extra dimensions to your knowledge of where you are in the map. Quite cool though, when done properly.
Re: 3D combat surface walking Posted by Fjorn on Sat Jun 2nd 2007 at 3:24am
Fjorn
250 posts
Posted 2007-06-02 3:24am
Fjorn
member
250 posts 25 snarkmarks Registered: Jun 5th 2004 Occupation: Student/Amateur Writer Location: California - USA
my problem was all the wall walking and ceiling walking making me sick
Signature? What signature!?
Re: 3D combat surface walking Posted by Yak_Fighter on Sat Jun 2nd 2007 at 4:32am
Yak_Fighter
1832 posts
Posted 2007-06-02 4:32am
1832 posts 742 snarkmarks Registered: Dec 30th 2001 Occupation: College Student/Slacker Location: Indianapolis, IN
mazemaster said:
Remember how weird it seemed the first time you played a 3D fps, how the movement and so forth seemed strange and foreign, but then over time you got used to it? I think thats how it would be with this.
No, I came out of the womb with a mouse in my right hand and markings on each finger of my left hand that spell out 'wasd'.
Re: 3D combat surface walking Posted by Naklajat on Sat Jun 2nd 2007 at 2:41pm
Naklajat
1137 posts
Posted 2007-06-02 2:41pm
Naklajat
member
1137 posts 384 snarkmarks Registered: Nov 15th 2004 Occupation: Baron Location: Austin, Texas
I don't use a keyboard or mouse. My character moves and shoots because I will him to move and shoot. That said, I found Prey DM damn confusing, and the weapons mostly lame and/or unbalanced.

o

Re: 3D combat surface walking Posted by Junkyard God on Mon Jun 4th 2007 at 7:10am
Junkyard God
654 posts
Posted 2007-06-04 7:10am
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
Not an FPS, but I heard one of the next Super Mario titles tries something similar. "Super Mario Galaxy" is what it's called, I think. It has these planets you can walk around in 3D space.
Imagien that being an FPS shooter eh :smile:
Hell, is an half-filled auditorium
Re: 3D combat surface walking Posted by parakeet on Mon Jun 4th 2007 at 10:47pm
parakeet
544 posts
Posted 2007-06-04 10:47pm
parakeet
member
544 posts 81 snarkmarks Registered: Apr 30th 2004 Occupation: n/a Location: Eastern US
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.
Re: 3D combat surface walking Posted by Stadric on Tue Jun 5th 2007 at 12:10am
Stadric
848 posts
Posted 2007-06-05 12:10am
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
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
Re: 3D combat surface walking Posted by Bewbies on Tue Jun 5th 2007 at 12:26am
Bewbies
413 posts
Posted 2007-06-05 12:26am
Bewbies
member
413 posts 41 snarkmarks Registered: Sep 10th 2003 Occupation: IT Dude Location: US-of-A
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
Re: 3D combat surface walking Posted by parakeet on Tue Jun 5th 2007 at 1:34am
parakeet
544 posts
Posted 2007-06-05 1:34am
parakeet
member
544 posts 81 snarkmarks Registered: Apr 30th 2004 Occupation: n/a Location: Eastern US
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
Re: 3D combat surface walking Posted by mazemaster on Tue Jun 5th 2007 at 10:28am
mazemaster
890 posts
Posted 2007-06-05 10:28am
890 posts 438 snarkmarks Registered: Feb 12th 2002
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.
Re: 3D combat surface walking Posted by Junkyard God on Tue Jun 5th 2007 at 10:47am
Junkyard God
654 posts
Posted 2007-06-05 10:47am
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
What's wrong with it being tedious :smile: that's what level design in general is, a tedious job :razz:
Now we don't have to worry about triangle terrain in hl1 we can just go do other anoying and frustrating jobs eh :biggrin:
Hell, is an half-filled auditorium
Re: 3D combat surface walking Posted by wil5on on Tue Jun 5th 2007 at 1:23pm
wil5on
1733 posts
Posted 2007-06-05 1:23pm
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
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).
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: 3D combat surface walking Posted by Junkyard God on Wed Jun 6th 2007 at 7:19pm
Junkyard God
654 posts
Posted 2007-06-06 7:19pm
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
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
Re: 3D combat surface walking Posted by Stadric on Wed Jun 6th 2007 at 10:12pm
Stadric
848 posts
Posted 2007-06-06 10:12pm
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
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
Re: 3D combat surface walking Posted by wil5on on Thu Jun 7th 2007 at 12:12pm
wil5on
1733 posts
Posted 2007-06-07 12:12pm
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
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.
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: 3D combat surface walking Posted by Junkyard God on Fri Jun 8th 2007 at 8:24am
Junkyard God
654 posts
Posted 2007-06-08 8:24am
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
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 :smile:

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 :razz:
Hell, is an half-filled auditorium
Re: 3D combat surface walking Posted by BlisTer on Fri Jun 8th 2007 at 9:17am
BlisTer
801 posts
Posted 2007-06-08 9:17am
BlisTer
member
801 posts 1304 snarkmarks Registered: Jun 10th 2004 Location: Belgium
lack of motivated coders has always prevented us from starting mods, but we can always hope..
Re: 3D combat surface walking Posted by Junkyard God on Fri Jun 8th 2007 at 11:15am
Junkyard God
654 posts
Posted 2007-06-08 11:15am
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
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
Re: 3D combat surface walking Posted by parakeet on Fri Jun 8th 2007 at 2:21pm
parakeet
544 posts
Posted 2007-06-08 2:21pm
parakeet
member
544 posts 81 snarkmarks Registered: Apr 30th 2004 Occupation: n/a Location: Eastern US
I can code, but physics aint my stuff :razz: .
Re: 3D combat surface walking Posted by Junkyard God on Fri Jun 8th 2007 at 2:34pm
Junkyard God
654 posts
Posted 2007-06-08 2:34pm
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
Learn you must! :biggrin: /yoda
Hell, is an half-filled auditorium
Re: 3D combat surface walking Posted by Stadric on Fri Jun 8th 2007 at 6:50pm
Stadric
848 posts
Posted 2007-06-08 6:50pm
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
F = ma
T(torque, not the period) = F/r

g=G(m1)(m2)/d<sup>2</sup>, G = 6.67*10^-11 (m<sup>3</sup>)/kg(s<sup>2</sup>)

And that's all you need to know!
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: 3D combat surface walking Posted by mazemaster on Fri Jun 8th 2007 at 7:31pm
mazemaster
890 posts
Posted 2007-06-08 7:31pm
890 posts 438 snarkmarks Registered: Feb 12th 2002
parakeet said:
I can code, but physics aint my stuff :razz: .
Hey perfect. My physics/math is great, but my c++ isnt up to par.
Re: 3D combat surface walking Posted by Junkyard God on Fri Jun 8th 2007 at 7:48pm
Junkyard God
654 posts
Posted 2007-06-08 7:48pm
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
F = ma
T(torque, not the period) = F/r

g=G(m1)(m2)/d<sup>2</sup>, G = 6.67*10^-11 (m<sup>3</sup>)/kg(s<sup>2</sup>)

And that's all you need to know!
I'm s**t at math so it seems. that makes verry little sense to me :smile:
Hell, is an half-filled auditorium
Re: 3D combat surface walking Posted by Stadric on Sat Jun 9th 2007 at 1:10am
Stadric
848 posts
Posted 2007-06-09 1:10am
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
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
Re: 3D combat surface walking Posted by wil5on on Sat Jun 9th 2007 at 2:22am
wil5on
1733 posts
Posted 2007-06-09 2:22am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
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!
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: 3D combat surface walking Posted by Stadric on Sat Jun 9th 2007 at 3:58am
Stadric
848 posts
Posted 2007-06-09 3:58am
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
Makes sense, I was thinking that, but I wasn't entirely sure because I hate rotational motion.
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: 3D combat surface walking Posted by Naklajat on Sat Jun 9th 2007 at 4:15am
Naklajat
1137 posts
Posted 2007-06-09 4:15am
Naklajat
member
1137 posts 384 snarkmarks Registered: Nov 15th 2004 Occupation: Baron Location: Austin, Texas
F = ma
T(torque, not the period) = F/r

g=G(m1)(m2)/d<sup>2</sup>, G = 6.67*10^-11 (m<sup>3</sup>)/kg(s<sup>2</sup>)

And that's all you need to know!
tl;dr :razz:

I like the idea of fighting across part of an asteroid belt or the wreckage of a spaceship though. A potential problem for using accurate calculations would certainly be the fact that you need a lot of mass to have gravity substantial enough to hold a person on the ground. UE3 has gravity volumes, I made a roboblitz test map where you can drive on the walls and ceiling, but the transitions make your view do strange things. One thing I found myself wishing for in it was spherical or cylindrical gravity volumes, I wanted to make a space station like the one in 2001: A Space Odyssey.

o

Re: 3D combat surface walking Posted by Crono on Sat Jun 9th 2007 at 6:27am
Crono
6628 posts
Posted 2007-06-09 6:27am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Wouldn't it be a bit easier to find a physics API floating around online?
Or at the least, check out the functions the source engine already provides? (Havok API)

Just to nitpick, the units for these things aren't specifically metric or imperial. For instance, torque can be expressed in Newton per Meter ... Pound per Inch so on and so forth. Of course, generally, the math is easier if expressed in metric.
Blame it on Microsoft, God does.
Re: 3D combat surface walking Posted by Stadric on Sat Jun 9th 2007 at 7:01am
Stadric
848 posts
Posted 2007-06-09 7:01am
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
Well, yeah, but it takes less time to type meter than "generic unit of distance". :rolleyes:
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: 3D combat surface walking Posted by mazemaster on Sat Jun 9th 2007 at 9:15am
mazemaster
890 posts
Posted 2007-06-09 9:15am
890 posts 438 snarkmarks Registered: Feb 12th 2002
Some images in this post have been automatically down-sized, click on them to view the full sized versions:

Some images in this post have been automatically down-sized, click on them to view the full sized versions:

Some images in this post have been automatically down-sized, click on them to view the full sized versions:

Some images in this post have been automatically down-sized, click on them to view the full sized versions:Some images in this post have been automatically down-sized, click on them to view the full sized versions:

Some images in this post have been automatically down-sized, click on them to view the full sized versions:Ok, so the basic idea for applying gravity is to figure out which surface is closest to the player (calculate the distance from the player to the surface for each surface), and then use the normal to the closest surface as the gravity direction.

I made some images that show how to calculate the distance from the player to any given triangular surface using simple vector operations. Since the operations are all simple vector manipulations, in theory they could be fast enough for real-time gravity calculations.

<a href="http://img396.imageshack.us/img396/6872/surfacedist1cl7.png" target="_blank">User posted image</A>
<a href="http://img396.imageshack.us/img396/3580/surfacedist2nh5.png" target="_blank">User posted image</A>
User posted image
User posted image

Now I have no clue how to find all the player positions and surface normals and so forth with the SDK, but theres the underlying strategy.

EDIT: Also, I am betting that a lot of these calculations are already done for the purpose of collision detection (how close is the player to a wall?) among other things, so I might not have to redo these calculations each frame. ?
Re: 3D combat surface walking Posted by wil5on on Sat Jun 9th 2007 at 12:23pm
wil5on
1733 posts
Posted 2007-06-09 12:23pm
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
Doesnt look like it will be immensely computationally expensive, considering that yes, most of these vectors will already be generated (I havent seen the SDK myself personally but theyre definitely used for other calculations in-game) and the mathematical operations are fairly straightforward vector ops.

Of course, it will take a bit of testing and experimenting to see if this "feels" right. One case that springs to mind is the idea of just walking up to a wall: if we are calculating distance from the centre of the player, youll fall into the wall youre walking towards once youre less than half your height away (40ish units in HL/HL2), stand up then fall back onto the floor since standing up pushes your centre away from the wall. Cases like this can make or break it, so just be mindful.

Has anyone considered how to calculate view directions? Does anyone understand quarternions (because I don't, and youll probably need them)?
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: 3D combat surface walking Posted by parakeet on Sun Jun 10th 2007 at 6:24pm
parakeet
544 posts
Posted 2007-06-10 6:24pm
parakeet
member
544 posts 81 snarkmarks Registered: Apr 30th 2004 Occupation: n/a Location: Eastern US
The problem here inlies that there is no way to tell the mass of any given wall, that multiple brushes will be seen as multiple masses. If we gave every ground the same force of gravity then it might work. Ugh I'm bad at explaining, but a small tiny blob in space shouldn't pull you off the ground like the real ground does. Maybe we want it to though, clarification would be nice :razz: .
Re: 3D combat surface walking Posted by Crono on Sun Jun 10th 2007 at 6:52pm
Crono
6628 posts
Posted 2007-06-10 6:52pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
I imagine Source already has functions in its API for camera control and data retrieval. I'm not sure why people are concerned with the camera ... are you thinking of changing the perspective? In which case, you can implement an "intelligent" camera, personally, I'd use Gears of War as an example.

I think, the easiest way to go about this, that no one has really suggested, would be use some sort of area property, like a hit box, if you want to think of it that way, once entering some mass' area-box you will be affected by it's gravity. Of course, many area-box's can overlap so you just normalize the gravity, and the stronger one wins, generally. If the "planetary" masses are used sparingly, you could just make those physics objects in Source (How many are you really going to have? 10? Ooohh, big deal, that's only 10 physics objects) and you can use this "pull" functionality in addition to the existing physics abilities. As long as the outer world it self doesn't have some gravity constant (currently, in Source, it does, you'd have to overload that), you'll be golden. So golden, that if you launched yourself away from all the masses in the world, you would actually get pulled back towards them if this is done correctly. But this is only if you want to simulate multi-planetary masses with inter-acting gravitational pulls. You could also give them repulsion from one other. After all, you would just negate the force value that is returned from your gravity function.
Blame it on Microsoft, God does.
Re: 3D combat surface walking Posted by wil5on on Mon Jun 11th 2007 at 12:07am
wil5on
1733 posts
Posted 2007-06-11 12:07am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
View directions are what I always stumble on when playing around with things like this. I agree the rest is fairly easy, which is why I brought it up. I dont have the mathematics to do the proper transformations (I'm guessing you do) so I really dont know.

Note that at no point in the game does the players body actually rotate.
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: 3D combat surface walking Posted by mazemaster on Mon Jun 11th 2007 at 2:02am
mazemaster
890 posts
Posted 2007-06-11 2:02am
890 posts 438 snarkmarks Registered: Feb 12th 2002
I can do the camera and player body rotation maths with matricies (that is how we did it in physics class where speed, stability, etc wasn't an issue), but I think the industry standard is quaternions like you say. I don't know anything about quaternions, so thats a bit of an issue right now.