Please or Register to create posts and topics.

Tweaking game physics

Page 1 of 2Next

I have well over 1000 hours playing the original game of Portal, and can play the entire game end-to-end (without glitches, cheats, or scriptstools) easily under 30 minutes. One thing I've noticed is that many of the original maps have their physics tweaked so that some things are either harder or easier depending on the puzzles in the maps.

A few examples:

    * Some doors openclose faster.
    * Turret reaction time is fasterslower
    * Fling distances varies
    * Throwing things to hit a target is hardereasier.

So here is my question: Are these subtle things independently controlled at the mapping level through Hammer, or at times is there more going on at the C++ source code level to tweak the individual maps to have slightly different physic behavior? I understand there are many parameters to control objects which can be made through Hammer. And I also understand the C++ source code has not be released for Portal, so we can't look at it to see what they done at the lower levels. From what I've read, Valve modifiedenhanced the game engine significantly from the HL2 game engine.

To be clear, I am not asking how to do the these things in Hammer, I just want to get a general idea if there are some physic tweaks in the original game that are being done at the C++ level (specific to each map), thus can't be done in mapsmods. The physics in fan made mapsmods seem very consistent, nothing like some of the tweaks I've noticed in the maps from the original game.

Thanks :)

Well then.
* Some doors openclose faster.
This is quite easy to do in hammer, so that isn't code related.

* Turret reaction time is fasterslower
I think that's just your imagination. And also, since it uses AI, it can be a bit "hit and miss", so it is probalby just the way the code is ordered that causes this to happen. (Wait... The order of the code shouldn't do anything much. Probably something to do with how the game orders importance of certain things.

* Fling distances varies
That is definately done in hammer... Unless your talking about the amount of momentum needed for a certain fling, in which case it is due to the "physics bubble" around the portal which isn't as acurate as normal Physics.

* Throwing things to hit a target is hardereasier.
Thats just because the physics engine is not perfect, and certain things happen different ways when you do them differently.

Quote:
The physics in fan made mapsmods seem very consistent, nothing like some of the tweaks I've noticed in the maps from the original game.

Hmmm... Well, from your examples from original portal, they should be just as varied, is it possibly because you only play through custom maps a few times, and thus don't notice it as much as in the origonal portal?

I ussually experience the opposite; Physics is more uneven in custom maps than it is in the original portal.

Quote:
and can play the entire game end-to-end (without glitches, cheats, or scriptstools) easily under 30 minutes

So can I, Hi-five! (virtually of course).

Thanks for the comments. Hi-5 back! :D In general, the type of physicmap tweaking I am referring to is very subtle. The type that only advance gamers and mappermodders would be able to detect. Some what like noticing a couple missing pixels on 1920x1080 flat screen and being slightly obsessive about really small details (but, that's also how people get really good too). :mrgreen:

Some real examples would be from Chamber-13. Being able to toss the cube and trigger the super button is noticeably easier compared to tossing the cube in other chambers. In chamber-12, its practically impossible to toss the cube from upper ledge and have it activate the super button. I have practiced 100s of times trying to perfect the toss and thus far get less than 3% success, about on par with random throws & luck. In Chamber-13, I get about 50% success. If they did tweak the physics slightly, there probably isn't much difference between the two chambers, but just enough so that the success rate is much lower in 12 than in 13 when tossing the cube. Also, in Chamber-13, the door to the exit elevator openscloses slower, just enough to shoot a portal past it as it closes (when a cube toss triggers the door, but cube fallsbounces off super button). Example of Chamber-13 cube toss. No reason to watch the entire video, just Chamber-13.

JackSafari wrote:
Some real examples would be from Chamber-13. Being able to toss the cube and trigger the super button is noticeably easier compared to tossing the cube in other chambers. In chamber-12, its practically impossible to toss the cube from upper ledge and have it activate the super button. I have practiced 100s of times trying to perfect the toss and thus far get less than 3% success, about on par with random throws & luck. In Chamber-13, I get about 50% success. If they did tweak the physics slightly, there probably isn't much difference between the two chambers, but just enough so that the success rate is much lower in 12 than in 13 when tossing the cube. Also, in Chamber-13, the door to the exit elevator openscloses slower, just enough to shoot a portal past it as it closes (when a cube toss triggers the door, but cube fallsbounces off super button). Example of Chamber-13 cube toss. No reason to watch the entire video, just Chamber-13.

All of these things are caused by entities in the map as edited in Hammer. None of them as far as I know are done at "the C++ level". The button thing is caused by the presence of a trigger_vphysics_motion on some buttons (specifically buttons where you would want to toss a box on them from a distance). The door speed is just a setting required for every door. Fling distances could be changed by the presence of a trigger_push, whether you have portal funnel on, some physics glitch, or something, but I've never noticed this consistently different from map to map. For the turret timing differences, I'm going to go with hanging_rope and say it's probably just your imagination.

Absolutely nothing you have listed about wanting to do would need to be done on the "programming level".

The turrets do have different timing settings, but again, that's all done in Hammer. The "Fast Retire" flag makes them wake up and go to sleep more quickly.

npc_portal_turret_floor

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.
msleeper wrote:
The turrets do have different timing settings, but again, that's all done in Hammer. The "Fast Retire" flag makes them wake up and go to sleep more quickly.

Ah I never noticed that, probably because I don't like using turrets.

Mevious wrote:
msleeper wrote:
The turrets do have different timing settings, but again, that's all done in Hammer. The "Fast Retire" flag makes them wake up and go to sleep more quickly.

Ah I never noticed that, probably because I don't like using turrets.

...How did I know msleeper would say something to disprove my turret point?
I should have brought this point up earlier: It is IMPOSSIBLE to have variations within a single map that are exclusively on the C++ level. (To my knowledge of how source works). It may be possible to make C++ level adjustments to specific levels, but valve generally doesn't do that. Most of the time they use C++ to create the entities so it is easier to change the map from within hammer. This also makes it faster to tweak gameplay.

tl;dr: Everything can be done in hammer.

Not really trying to "disprove" you, just clarifying the facts. I was fucking with turrets recently and used the flags so it was fresh on my mind.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.
msleeper wrote:
Not really trying to "disprove" you, just clarifying the facts.

I know. however,I had the feeling that someone that has used turrets recently would remember something.

hanging_rope wrote:
Mevious wrote:
msleeper wrote:
The turrets do have different timing settings, but again, that's all done in Hammer. The "Fast Retire" flag makes them wake up and go to sleep more quickly.

Ah I never noticed that, probably because I don't like using turrets.

...How did I know msleeper would say something to disprove my turret point?
I should have brought this point up earlier: It is IMPOSSIBLE to have variations within a single map that are exclusively on the C++ level. (To my knowledge of how source works). It may be possible to make C++ level adjustments to specific levels, but valve generally doesn't do that. Most of the time they use C++ to create the entities so it is easier to change the map from within hammer. This also makes it faster to tweak gameplay.

tl;dr: Everything can be done in hammer.

Valve has plenty of map specific hacks in half life. I recall a line from the ep2 source code that read something like:

Quote:
//!!!HACKHACKHACK!!! If the player tries to crossbow over alyx while shes crouching it is absorbed by her physbox, set her as owner. player loses a kill but at least the shot fires right
if (engine->MapName == "ep2_outlands_05")
this->Owner = pOther;
Page 1 of 2Next