Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: kasperl on April 11, 2004, 07:44:45 am

Title: setting time compression to values lower then 1
Post by: kasperl on April 11, 2004, 07:44:45 am
I know we're in a code freeze, but i recently saw Kazan mentioning he bumped the time compression max to 64x, and i was wondering if he could bump the min to something like .25 or .125. Why? Cutscene recording. If we can set the time compression lower, we can record at a lower framerate, then speeed up the animation, thereby creating a higher framerate then attainable by direct recording.

Is this even possible? If not, then i will search for other options. If it is, but can't be implemented due to the code freeze, i'll just hold.
Title: setting time compression to values lower then 1
Post by: karajorma on April 11, 2004, 08:06:27 am
MIght make it a bit easy to cheat but what the hell. It's not like there aren't other methods to cheat :D
Title: setting time compression to values lower then 1
Post by: Turnsky on April 11, 2004, 09:24:16 am
freespace bullet-time? ;)
Title: setting time compression to values lower then 1
Post by: kasperl on April 11, 2004, 09:25:22 am
yeah, i guess.
Title: setting time compression to values lower then 1
Post by: Flaser on April 12, 2004, 01:33:11 am
...all we need now is shot-dodging and we're good for Gundam.

PS.:Ooops - we can already slide. I guess that takes care of the problem. If only we had dynamic models...
Title: setting time compression to values lower then 1
Post by: kasperl on April 12, 2004, 04:55:38 am
any coder input on this?
Title: setting time compression to values lower then 1
Post by: JarC on April 12, 2004, 05:41:24 am
Quote
Originally posted by Flaser
PS.:Ooops - we can already slide. I guess that takes care of the problem.
I keep reading that...funny thing is...that has never worked for me...
Title: setting time compression to values lower then 1
Post by: kasperl on April 12, 2004, 05:43:17 am
you need a ship capable of sliding.....  And you need to set key bindings, IIRC/AFAIK.
Title: setting time compression to values lower then 1
Post by: Havock on April 12, 2004, 06:28:25 am
freespace bullettime would be cool.

especially since WW2 pilots expierenced a similair thing due to adrenaline rush etc.

guess man wouldn't have de-evolved it's adrenal glands by then :p
Title: setting time compression to values lower then 1
Post by: kasperl on April 12, 2004, 06:51:03 am
no, but aside from gameplay issues, it'll help ingame recorded cutscenes too.
Title: setting time compression to values lower then 1
Post by: Lightspeed on April 12, 2004, 11:13:21 am
Quote
Originally posted by JarC
I keep reading that...funny thing is...that has never worked for me...


That's cause you arent shivan :p
Title: setting time compression to values lower then 1
Post by: Col. Fishguts on April 12, 2004, 02:31:12 pm
Quote
Originally posted by Lightspeed


That's cause you arent shivan :p


Yeah, either that, or you need Carls as your co-pilot....
Title: setting time compression to values lower then 1
Post by: Johnmike on April 12, 2004, 06:01:09 pm
Imagine co-pilots in multiplayer...  Turret gunners, sliders...
Title: setting time compression to values lower then 1
Post by: Havock on April 13, 2004, 06:33:54 am
not for multiplay, but see it in singleplay:
diving in slo-mo just inches away from a beam, dodging flak, then dumping your payload on the unlucky corvette...

a, that would be a nice cutscene :p
Title: Re: setting time compression to values lower then 1
Post by: Setekh on April 13, 2004, 06:50:27 am
Quote
Originally posted by kasperl
Why? Cutscene recording. If we can set the time compression lower, we can record at a lower framerate, then speeed up the animation, thereby creating a higher framerate then attainable by direct recording.


I like your thinking - this would be a boon for us with low-spec PCs who want to record gameplay. :)
Title: setting time compression to values lower then 1
Post by: Kazan on April 14, 2004, 11:25:10 am
I'll take a look - i think it may be

i think the variable is set to 2^16 when time = 1x
Title: setting time compression to values lower then 1
Post by: Nico on April 14, 2004, 11:30:03 am
Quote
Originally posted by Havock
not for multiplay, but see it in singleplay:
diving in slo-mo just inches away from a beam, dodging flak, then dumping your payload on the unlucky corvette...

a, that would be a nice cutscene :p


a nice cutscene, but a boring mission :p
"Oh, look out, missiles!!!
-yeah, hold on, I'm drinking my coffee.
-quick, there's already been 3 missile warning beeps!!!!
- So that leaves at least 30 more seconds for me, no rush."
:p
Title: setting time compression to values lower then 1
Post by: Kazan on April 14, 2004, 11:41:49 am
Code: [Select]

001x: 00000000 00000001 00000000 00000000
002x: 00000000 00000010 00000000 00000000
004x: 00000000 00000100 00000000 00000000
008x: 00000000 00001000 00000000 00000000
016x: 00000000 00010000 00000000 00000000
032x: 00000000 00100000 00000000 00000000
064x: 00000000 01000000 00000000 00000000
128x: 00000000 10000000 00000000 00000000
Title: setting time compression to values lower then 1
Post by: kasperl on April 14, 2004, 01:11:32 pm
*hates binary*

anyway, i think you are saying we can go back a really, really small time compression if we want to, and we can go to a more high compression too.

any particular reason why there are no values outside the third byte right now?
Title: setting time compression to values lower then 1
Post by: Kazan on April 14, 2004, 01:35:22 pm
(2nd byte - big edian)

if statements constraining it into that byte
Title: setting time compression to values lower then 1
Post by: kasperl on April 14, 2004, 02:04:59 pm
didn't binary work from right to left?
/me is an idiot.

and i can't make sense of that last sentence, sorry.
Title: setting time compression to values lower then 1
Post by: Kazan on April 14, 2004, 03:54:13 pm
binary is only right->left on mac's (and a few other less common machines)

_but_ in technical writing,etc it's ALWAYS left->right - like every other number system in english reads

how about hex

00 01 00 00
00 02 00 00
00 04 00 00
00 08 00 00
00 10 00 00
00 20 00 00
00 40 00 00
00 80 00 00

:D
Title: setting time compression to values lower then 1
Post by: kasperl on April 15, 2004, 02:32:36 am
*cries*

binary, i thought i could understand, but Hex?

:shiver:

anyway, is it possible, and how long would it take?
Title: setting time compression to values lower then 1
Post by: Kazan on April 15, 2004, 08:46:18 am
Hint: One Hex digit reperesents four bits - 1-9, A-F (0-15 decimal, 0000 to 1111 binary)
Title: setting time compression to values lower then 1
Post by: kasperl on April 18, 2004, 04:13:34 am
ugh.

anyway, is it possible, post 3.6, or 2 lines of code that won't be called breaking the code freeze?
Title: setting time compression to values lower then 1
Post by: Kazan on April 18, 2004, 08:12:08 am
2 lines of code won't be called breaking the code freeze

good thing you bumped this.. it slipped my mind
Title: setting time compression to values lower then 1
Post by: kasperl on April 18, 2004, 08:12:53 am
no problem

i would be really, really happy for having this.
Title: setting time compression to values lower then 1
Post by: Goober5000 on April 18, 2004, 08:48:44 pm
Kazan, add a test so that you have to have cheats enabled for this to work.  It's kind of a cheat anyway, plus the fact that I tend to mash the "slow down" buttons repeatedly without counting how many times it's necessary and I wouldn't want to have to check that I'd gotten it square on the 1x.
Title: setting time compression to values lower then 1
Post by: Kazan on April 18, 2004, 08:51:10 pm
i'll see what i can do
Title: Re: setting time compression to values lower then 1
Post by: ZylonBane on April 19, 2004, 11:31:47 am
Quote
Originally posted by kasperl
I know we're in a code freeze, but i recently saw Kazan mentioning he bumped the time compression max to 64x, and i was wondering if he could bump the min to something like .25 or .125. Why? Cutscene recording.
Ummm, if this is the main reason for this request, wouldn't it make more sense to just ask for built-in movie recording?
Title: setting time compression to values lower then 1
Post by: kasperl on April 19, 2004, 11:38:47 am
you know, build in movie recording has been requested a lot of times. a lot. it won't happen without major code changing.
Title: setting time compression to values lower then 1
Post by: karajorma on April 19, 2004, 11:39:38 am
Besides as Kasperl suspected this could be done in a couple of lines of code.
Title: setting time compression to values lower then 1
Post by: Singh on April 24, 2004, 11:46:27 pm
hmmmmmmm.........
any progress with this? :)
Title: setting time compression to values lower then 1
Post by: Goober5000 on April 25, 2004, 12:21:56 am
Yes.  Be patient.
Title: setting time compression to values lower then 1
Post by: Kazan on April 25, 2004, 08:54:04 am
what is the point in cheatmoding TC < 1 - it doesn't give you an advantage in combat
Title: setting time compression to values lower then 1
Post by: Goober5000 on April 25, 2004, 08:57:16 am
It does, though.  It gives you time to think and aim.  And this way is better because you have to deliberately slow it down past 1x speed, whereas before you could go below 1x accidentally.
Title: setting time compression to values lower then 1
Post by: Kazan on April 25, 2004, 09:32:33 am
it doesn't help your aim, because your ability to move your ship slows proportionately and your controls become no less sensative

trust me i tried
Title: setting time compression to values lower then 1
Post by: Goober5000 on April 25, 2004, 01:54:47 pm
I tried it too.  I figured out how to take advantage of it after I had messed around with it a bit.
Title: setting time compression to values lower then 1
Post by: kasperl on April 25, 2004, 01:56:26 pm
now, can this be implemented? i will even settle for using special builds, command lines, or cheats, or even editing text files/register files  or using wierd key bindings, but this would be a gigantic boon to in-game cutscene recording.
Title: setting time compression to values lower then 1
Post by: Goober5000 on April 25, 2004, 01:59:45 pm
It's been implemented and it's in CVS.  It'll be in the next released build.  Use cheat mode to activate it.
Title: setting time compression to values lower then 1
Post by: kasperl on April 25, 2004, 02:01:13 pm
i love you guys.
Title: setting time compression to values lower then 1
Post by: Singh on April 25, 2004, 02:25:11 pm
w000t.

Thank you Goober and Kazan!! :D
Title: setting time compression to values lower then 1
Post by: Setekh on April 25, 2004, 07:47:49 pm
Whoa, awesome. Well done, folks... say, this'll help us get better weapons screenshots and the like a lot easier. :)
Title: setting time compression to values lower then 1
Post by: Turambar on April 25, 2004, 08:59:16 pm
dude! it will!!  the Inferno peeps will be so happy!
Title: setting time compression to values lower then 1
Post by: kasperl on April 26, 2004, 11:21:02 am
Quote
Originally posted by Goober5000
It's been implemented and it's in CVS.  It'll be in the next released build.  Use cheat mode to activate it.


as i said in the recent build thingy, nor your latest build, nor my own compile (updated 40 min ago) let it work.

i typed www.freespace2.com , it said "cheats activated" and i tried pressing ****+< but only the error beepy thingy sounded. i can up the speed using shift+> to 64x, but i can't go below 1.
Title: setting time compression to values lower then 1
Post by: Kazan on April 26, 2004, 11:52:41 am
goober you retard! *MEGA****ING WALLOPS!* You completely undid my code changes.. FREAKING RETARD!
Title: setting time compression to values lower then 1
Post by: kasperl on April 26, 2004, 11:54:31 am
how do i love public boss/worker bondings.............

aside from the questionable intellegence of certain members of the SCP team, when do you think you have it all committed again?
Title: setting time compression to values lower then 1
Post by: Kazan on April 26, 2004, 11:59:23 am
10 minutes... he tried moving the stuff over to a werd obfuscated part of the code when all he had to do is change an IF statement
Title: setting time compression to values lower then 1
Post by: kasperl on April 26, 2004, 12:00:52 pm
ok.

I'll update my CVS in 20 and build after that. Should i post that build in this thread?
Title: setting time compression to values lower then 1
Post by: Kazan on April 26, 2004, 12:27:39 pm
fixed, commited
Title: setting time compression to values lower then 1
Post by: kasperl on April 26, 2004, 12:38:01 pm
whoa!

i did a full update this afternoon, and it has been updating for 5 min and is still going......
Title: setting time compression to values lower then 1
Post by: Shinobi on April 26, 2004, 12:39:01 pm
Quote
Originally posted by kasperl
ok.

I'll update my CVS in 20 and build after that. Should i post that build in this thread?


Well scince I, as part of the TI team, am going to be recording your videos for you then please do :)
Title: setting time compression to values lower then 1
Post by: kasperl on April 26, 2004, 12:52:01 pm
ah, thank you for that.

Singh should give you the actual missions, BTW.

It's still updating though....
Title: setting time compression to values lower then 1
Post by: Goober5000 on April 26, 2004, 01:43:45 pm
Kazan, that outburst was completely and utterly unnecessary.

The code wasn't changed at all.  I did what I said I would, and made it activated in cheat mode.  This means that 1) you need to type www.freespace2.com to activate it, and 2) you need to hold down the tilde while slowing down the time.  The code isn't obfuscated; it's perfectly readable.  I tested it and it works perfectly.  You would have seen what was going on if you hadn't been blinded by your knee-jerk reaction. :rolleyes:

The latest build (20040426_fs2_open_r) in the RECENT BUILDS forum has this feature included.
Title: setting time compression to values lower then 1
Post by: Kazan on April 26, 2004, 01:48:16 pm
you made it so you had to remove your hands from the controls then.. i just make it so when Cheats_enabled it changes the min val
Title: setting time compression to values lower then 1
Post by: Inquisitor on April 26, 2004, 01:52:57 pm
try not to kill each other please, and try not calling someone a retard, it really doesn't make your point, just obfuscates it.

and probably has the opposite effect, makes you look silly.
Title: setting time compression to values lower then 1
Post by: Turambar on April 26, 2004, 01:55:01 pm
we could let Bobbau record the movies with the reduced time compression and his kickass graphics card to get perfect gameplay vids
Title: setting time compression to values lower then 1
Post by: Gregster2k on April 26, 2004, 05:47:55 pm
now that time...uh...DEcompression has been created....
perhaps in the far far far far future we can have predefined FRED "fields of time" to simulate "temporal distortions", y'know, Star Trek style---by simply time-compressing or time-slowing specific ships, projectiles, etc. within a given region.

- Objects caught in faster-than-normal time fields move at normal speeds within the field, but see everything outside the field as moving a LOT slower than them.

- Objects caught in slower-than-normal time fields move at normal speeds within the field, but see everything outside the field as moving a lot faster than them. All audio transmissions would be slowed to half-speed...aka, "aaaaalllppphhhhhaaaaaa ooooonnnnneeeeee..." (not on the text, but on any voice speech). it would NOT be an advantage if the enemy is outside of the field. They'd be able to pick you off VERY easily.

Picture this: A Shivan juggernaught that creates an altered timefield around it, allowing it to pick off bombers like flies.
You're flying towards the thing to bomb it, suddenly you are warned by command (too late) of a slowed-time distortion field. The Shivan ship is taking forever to approach, its beam cannons are firing faster, everything around you, including your ship, is moving like its in Jell-O (your reported speeds and such remain the same on your instrumentation, but you are really going nowhere). Has actual time FIELDS ever been manipulated in a game before? I doubt it.

...MAN...just thinking about that idea is frighteningly cool.
Title: setting time compression to values lower then 1
Post by: Sandwich on April 26, 2004, 05:52:36 pm
*ahem*

We will remain civilized here, won't we, Kaz?
Title: setting time compression to values lower then 1
Post by: Flipside on April 26, 2004, 06:21:19 pm
Hey, we can do bullet-time with this! ;)

( Imagines the Trinity leaping up and smacking 5 dragons with a flying spin )

hehehe Freespace 2 meets the Matrix ;)
Title: setting time compression to values lower then 1
Post by: WMCoolmon on April 26, 2004, 07:00:54 pm
You're forgetting that *Everything* moves slower in such fields, including weapons, so you'd have to take into account the time differential when aiming as well.
Title: setting time compression to values lower then 1
Post by: Kazan on April 26, 2004, 07:02:00 pm
CAll me irritable - that's what happens when im busy trying to come up with ways to get the NeoCons out of here, im sick and tired of the Christian Right (Fundamentalists) interfering with everyone else's lives and trying to legislate their religion into our government
Title: setting time compression to values lower then 1
Post by: Sandwich on April 26, 2004, 07:18:21 pm
Quote
Originally posted by Kazan
CAll me irritable - that's what happens when im busy trying to come up with ways to get the NeoCons out of here, im sick and tired of the Christian Right (Fundamentalists) interfering with everyone else's lives and trying to legislate their religion into our government


Ok. You're irritable.

Take it out on those who caused it, not here. Thank you.
Title: Time Fields Concept - Dynamic, Relative Time Compression/Dilation System
Post by: Gregster2k on April 26, 2004, 07:53:15 pm
Coolmon: my concept is that timefields do not alter your perception of time inside them, they alter your perception of everything that ISNT inside them with you. AND, they alter how everyone else sees your ship, the one caught in the timefield.

Alpha 1 is flying near a Sathanas juggernaut.
Alpha's moving at exactly 60m/s.
The Sathanas is moving at exactly 10m/s.

Alpha 1 unknowingly flies directly into a field of time slower than "real" time. Twice as slow, in fact.

From Alpha 1's perspective, absolutely nothing out of the ordinary has happened.
There is no perceived slow-down, not even Matrix style.
His speed is still reported as 60m/s, and he's still moving at that speed within the field. Everything else in the field is moving at normal speeds as well, from Alpha 1's perspective. Gun projectiles and everything else move at their normal paces.
Alpha 1's targeting systems are still reporting the Sathanas' speed is 10mps. But to Alpha, the Sathanas APPARENTLY is moving at 20mps.
If Alpha 1 fires a missile out of the field, its speed as witnessed by Alpha 1 will "double" after it goes beyond the edge of the field.

Meanwhile, the Sathanas's point of view saw Alpha 1 slow down to half-speed after entering the field. The Sathanas's sensors still report Alpha 1 as moving at 60m/s, but apparently, Alpha 1 is really moving at 30m/s. When Alpha 1 fired guns to test speeds within the field, the shots moved twice as slow, as witnessed by the Sathanas. The missile fired by Alpha 1 moved slowly at first and returned to normal speed once it exited the field of slower time.

Now, if Alpha 1 exits the field, the Sathanas will see Alpha 1 apparently speed up back to "real" 60m/s, and Alpha 1 will see the Sathanas seem to slow down to "real" 10m/s.


2x slower field -- sucks to be the ship caught in one of these...
- ships in the field see objects outside the field moving 2x faster
- ships outside the field see objects in the field moving 2x slower

2x faster field -- more of an advantage to ships!
- ships in the field see objects outside the field moving 2x slower
- ships outside the field see objects in the field moving 2x faster


In either case, control of one's ship and movement within an altered time-field would be exactly the same as normal. As far as things in the fields are concerned, everyone ELSE has sped up or slowed down, when in reality, it is the things in the fields who have been changed!
Title: setting time compression to values lower then 1
Post by: WMCoolmon on April 26, 2004, 08:06:31 pm
Now, I could be wrong about this (I have trouble figuring out timezones :p), but bear with me.

Let's say Alpha 1 is going 60 m/s when he enters  timefield. Now, Mr.Sath decides to take a potshot at him.

To Sath, Al is moving at 30 m/s. So, it knows the shot will take exactly one second to reach Al and aims 30 meters ahead of him and fires. Everything is going fine and dandy, when...

...the shot hits the timefield. Suddenly, the speed of the laser is halved and it whizzes behind Al.
Title: setting time compression to values lower then 1
Post by: Kazan on April 26, 2004, 08:07:49 pm
time distortion fields - HELL FSCKING NO

you wanna rewrite the physics engine go right ahead
Title: setting time compression to values lower then 1
Post by: Gregster2k on April 26, 2004, 08:41:46 pm
Kazan: LOL! Get a grip, it doesn't have to be done RIGHT THIS SECOND. There's always tomorrow, no pun intended. I swear, its gotta be possible SOMEDAY. Physics engine? Nah, its just a matter of making people see each other differently. You see them fast, they see you slow, or vice-versa, and neither of you see anything wrong with your own ships.

Theoretically, find a way to make time compression work for SPECIFIC objects with an inverse compression/dilation relationship like this, and BOOM, its all good. No physics engine modification required, although it'd be best to stick with only 1.5-2x time modification fields as anything larger would be way too much :)

Um yes, firing primaries at objects caught in the fields from outside the fields WOULD be weird. You might have to use missiles, but if the enemy is in an *accelerated* timefield, you're in big trouble, because they will be able to run away long before the missile even hits the timefield :)

Keep in mind that even though relative to "real" time Alpha 1 is moving 30 mps, his speed on his HUD is 60mps and the Sathanas thinks its 60 as well because that's what his speed really is --- its just that the targeting computers can't understand its 60 meters per TWO seconds, not ONE.

However, it doesn't matter. A shot from the Sath hits the timefield aiming for a 60mps speed, slows to 30mps, and hits Alpha 1 dead on anyway.

Long story short you do NOT want to be in a decelerated timefield. You'll be a sitting duck.

Besides, it would be fun to have a campaign where the fabric of reality itself starts getting twisted around, perhaps by the Shivans.

I have always enjoyed sci-fi shows where relative time starts getting screwed up.
Title: setting time compression to values lower then 1
Post by: Kazan on April 26, 2004, 11:13:21 pm
*rolleyes* you have no idea the complexity of the code you're proposing
Title: setting time compression to values lower then 1
Post by: mrduckman on April 26, 2004, 11:30:39 pm
Though I haven't started to tinker with the code, I can say the same thing Kazan says.

As if someone from the commercial department wished to change some damn calculation for billing.....Good Ideas are some times difficult to implement.

Bah!.. Write it yourself!!! LOL
Title: setting time compression to values lower then 1
Post by: Singh on April 26, 2004, 11:37:55 pm
Quote
Originally posted by kasperl
ah, thank you for that.

Singh should give you the actual missions, BTW.

It's still updating though....


The mission is still WIP.....only 3 scenes so far. Check the internal, lets get moving.

On another note....I could just post the older one as a random show-off of sh33r SCP ub3rn3ss, despite the fact that is sucks in its implementation ;)
Title: setting time compression to values lower then 1
Post by: kasperl on April 27, 2004, 04:13:55 am
well, we'll discuss this in the internal, Singh.

as for timefields, doing this stuff localized seems to be rather, hard, so let's not bug the coders about it for now.
Title: setting time compression to values lower then 1
Post by: Gregster2k on April 27, 2004, 02:31:44 pm
i understand. Like I said, its an idea, but yeah, due to its complexity, hell, leave my idea on the farthest backburner for all I care, I just want to SOMEDAY see someone TRY to do what I've proposed, that's all. Honestly, if I knew how to do decent programming I'd be attempting to do this myself, but alas, I just can't. Best I can do is a Mad Libs program in C++.

:sigh: