HL2 physics

Posted By: Trev101524

HL2 physics - 09/05/05 06:06

this really isnt a technical question at all. anyways, would it be possible to recreate physics as seen in half-life 2 using gamestudios physics engine?
Posted By: Asse

Re: HL2 physics - 09/05/05 13:25

Download some demos from the Newton website and build your own opinion
Posted By: FoxZero

Re: HL2 physics - 09/05/05 17:26

I believe so. Depends on how good you are at programming.
Posted By: clone45

Re: HL2 physics - 09/05/05 20:27


Hi!

I spent a few days using Newton trying to get HL2 style graphics. Here's my post about it in the Newton forums:

http://newtondynamics.com/forum/viewtopic.php?t=1155&highlight=hl2

I haven't gotten it to work yet. If you do get it to work, please let me know!!

Cheers!
- Bret
Posted By: Pappenheimer

Re: HL2 physics - 09/05/05 20:51

Hi Bret,

I don't think that they turn off the physics in HL2 as you suggested at the newton forum. Look, how the things behave when you hit a wall or cieling.

Maybe, they used a sort of unvisible gripper.

Waybe, they added forces relating the position in front of the camera: if the object is not as near as the special position they add a force in direction to that position. If the object is at the position the strengh of the forces from all six directions is equal.

Just an idea, could work this way.
Posted By: Josh_Arldt

Re: HL2 physics - 09/06/05 02:29

I've done this with newton where the player can pick up/throw physics objects.
I have also added collisions between the player and the objects.
I might post a little demo if anyone is interested in seeing it at work.
Posted By: Towelie

Re: HL2 physics - 09/06/05 02:30

I do! I'm interested in seeing a small demo of this...
Posted By: clone45

Re: HL2 physics - 09/06/05 15:28


Hi Josh!

Yup, I'd love to see a demo as well! And source code!! :-)

- Bret
Posted By: Josh_Arldt

Re: HL2 physics - 09/06/05 19:55

Quote:

Yup, I'd love to see a demo as well! And source code!! :-)





Ok, great.

I may not be posting source code right away though as I have a little work to do on it before it's complete.
This depends on if I have these corrected when I post the demo.

There is one glitch while holding the objects that I need to fix such as:
the objects slowly spin while holding them, if you pick up an object with a mass lesser than 10 and turn the camera too quickly the object flys to the origin of the level and stays there spinning. I also want to make the E button toggle the holding on and off like in HL2 instead of having to hold the E button to hold them(I tried toggling before and it caused several problems... I'll have to come up with another way). I was also planning on adding ragdolls which can be picked up with a gravity gun weapon.

This should have been finished long ago, but other projects I am working on took priority.
Posted By: Trev101524

Re: HL2 physics - 09/06/05 22:05

great thanks, i just wanted to know how good the physics engin is on this program, and weather or not i should start writing plugins for my own or not.
Posted By: Docwes2004

Re: HL2 physics - 09/07/05 22:48

Sounds really good Josh!!
Posted By: Josh_Arldt

Re: HL2 physics - 09/08/05 01:16

I had some free time and fixed the, "objects slowly spin while holding them" problem.

I hope to have the demo posted sometime this weekend...
Posted By: Towelie

Re: HL2 physics - 09/08/05 02:39

yay!!

Cant wait. Will it only involve picking up and throwing objects or will it include blowing a can halfway across the level using a well placed grenade?

My mind started thingking while fooling around in CSS...
Posted By: Josh_Arldt

Re: HL2 physics - 09/08/05 06:14

Code:
Will it only involve picking up and throwing objects or will it include blowing a can halfway across the level using a well placed grenade?  



This should be easy to do!
I might consider putting this in.
Posted By: Matt_Coles

Re: HL2 physics - 09/15/05 10:45

I think this will be an excellent addition. Hope that this small project works out
Posted By: iWaNtToKnOw

Re: HL2 physics - 09/15/05 22:22

hi,
i tryied to make a gravity gun, like HL2, using the 3dgs physics system.
the concept is simple, a force is applyied to the object based on the diference between camera angles since last frame. And other force for the player movement, and the result is very stable
Posted By: Josh_Arldt

Re: HL2 physics - 09/15/05 22:29

Sorry I haven't yet posted my demo...
Haven't had enough time to work on it and there are still some things that I want to get done before posting.
Posted By: Towelie

Re: HL2 physics - 09/15/05 23:13

Cant wait to see the demo... goody goody goody
Posted By: Matt_Coles

Re: HL2 physics - 10/06/05 11:07

Any news Josh?
Posted By: MagZu

Re: HL2 physics - 03/08/06 22:54

bump
Posted By: Joozey

Re: HL2 physics - 03/11/06 18:50

0_o
Bump?
Say at least something useful when digging up an old threat.
Posted By: poke_smot

Re: HL2 physics - 03/12/06 03:27

I made a gravity type of thing for one of my games.
You used a "gravlifter" to move crates and slam them into the ground, smashing rats.

Anyway heres the relevent function
Code:

function gravGunMain(){
var myTemp;
sfxBuzz = ent_playloop(gravEnt,gravBuzz,600); //start buzzing noise at gravEnt
sfxElectroHumm = snd_loop(electroHumm,25,0); //start underlying electric humm
while(effectCount < 6){
ent_create("magma_tirc.bmp",gravEnt.x,gravFx); //create effects
effectCount += 1;
}
while(gravSwitch == 1){
phent_setdamping(gravEnt,90,30); //set linear damping high to help control
//- slam gravEnt to ground
if(mouse_right){
if(myTemp == 0){
myTemp = 1;
phent_addvelcentral(gravEnt,vector(0,0,-1500));
// phent_addvellocal(gravEnt,vector(1000,0,0),vector(0,0,0));

}
}
else{ //return to hover position
myTemp = 0;
}
gravPointEnt.z = max(-350,min(gravPointEnt.z,-200)); //lock z range of gravPointEnt

//- set and adjust final movement vector
vec_lerp(gravForce,gravPointEnt.x,gravEnt.x,0.5);
vec_sub(gravForce,gravEnt.x);

//- add physics force to gravEnt
phent_addvelcentral(gravEnt,gravForce);
wait(1);
}
snd_stop(sfxBuzz); //stop buzzing
snd_stop(sfxElectroHumm); //stop humming
phent_setdamping(gravEnt,10,30); //return to low damping for better free flight
}



gravPointEnt is an invisible entity that is controled with the mouse, this entity marks where the gravEnt should be.
gravEnt is the entity affected by gravity.
gravSwitch is the toggle, == 1 gravity gun is on, == 0 freeflight
© 2024 lite-C Forums