.skip

.skip

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

.skip

Post by trepan »

A new command that allows skipping through time
in replays, and in-game (if cheating is enabled).

Code: Select all

.skip <[+|f]seconds>
+: make the skip relative
f: skip to a specific frame
Examples:
.skip +60 -- skip 1 minute from the current time
.skip 600 -- skip to 10 minutes into the game
.skip f789 -- skip to frame 789

You can only go forward in time ;)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

trepan...











































IS A GOD LIKE TOBI!!!!!!

ZOMG!!!
ZOMG!!!11elkeven11!


Dude, weriously, nice frickin work. That is awesome.
User avatar
Masse
Damned Developer
Posts: 979
Joined: 15 Sep 2004, 18:56

Post by Masse »

all we now need is lua widget that shows the whole timeline and by clicking it makes it to jump there :)
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

Oh cool, i have wanted that for long time.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

niice.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

So gamestates are saved per-frame now? Or does it just rush through the calculations for each frame without rendering?
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Guess its justs calculates to skipped time without rendering otherwise it be possible to go backwards
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

When resync is done, it may be possible to go backwards.
I did something similar for another game, and had the game
state saved every X number of seconds (configurable period).
You could jump to any time in a replay with a resolution of X.

If all that state is kept in the replay file, it gets much bigger. The
best idea is probably to leave the replay format as it is, and
create snapshots as you are viewing. The current skip forward
technique will still work (not as quickly as using stored state),
and you will be able to go backwards.
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Post by manored »

Masse wrote:all we now need is lua widget that shows the whole timeline and by clicking it makes it to jump there :)
And something to keep noob hosts from using it to get their krogs ready faster... :P
Radja
Posts: 70
Joined: 30 Dec 2006, 19:48

Post by Radja »

manored wrote:
Masse wrote:all we now need is lua widget that shows the whole timeline and by clicking it makes it to jump there :)
And something to keep noob hosts from using it to get their krogs ready faster... :P
i dont think you can have a timeline when you have no time limit

but i agree, we need some electrical shocks device attached to people who enjoy toying with speed ingame

could min/max speed be set to 1.0 by default?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

quantum has released a widget that sets the min and
max speeds to 1.0 if the widget is run by the host player.

http://spring.unknown-files.net/file/22 ... Widget_v2/
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Isnt there a TASClient option that does the same via script.txt.
When hosting, although other clients unable to see if its set or not, since not in Lobby Protocol
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

In video, creating keyframe indexes - starting points for each jump regardless the direction - is key to keeping interlaced video properly aligned with the screen when making short jumps through it. Trepan has a good idea on how to solve the rewind issue. Create snapshots - keyframes - every 30-60 seconds. Enough to give some granularity in the replay, but not enough to kill playability.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

In video, snapshots arent 20 mb
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

No shit, snapshots for video are a hell of alot bigger. Then again if they aren't bigger than 20MB then you probably aren't doing serious index support.
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Post by ILMTitan »

I think he meant 20mb each.
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

As did I, 20MB of DVD quality video isn't really saying much of anything. I did plenty of 2 gig files in my early days of video editing back on a 486 with a miro card. A 20MB clip even in those cases of uncompressed jmpeg 320x240 interlaced video with embedded synchronized sound was a mere several seconds worth.

(Why did I stop at 2 gig? Because windows didn't support bigger ones at that time.)
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Post by ILMTitan »

If I'm not mistaken, uncompressed video is like having a snapshot every frame. Assuming several seconds means two, and twenty five frames per second, and negligible size for sound, that gives us about 410KB per snapshot, quite a bit less than 20MB.
User avatar
Decimator
Posts: 1118
Joined: 24 Jul 2005, 04:15

Post by Decimator »

Hmm, is there any real reason this couldn't be used as a backbone for saved games as well?
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

ILMTitan wrote:If I'm not mistaken, uncompressed video is like having a snapshot every frame. Assuming several seconds means two, and twenty five frames per second, and negligible size for sound, that gives us about 410KB per snapshot, quite a bit less than 20MB.
Is PAL only 25/sec? NTSC is 29.73/sec or something close to it. Don't forget interlaced is a pair of screens per frame, each pass slightly shifted off the other. The uncompressed video is not really a comparable format, I just captured in uncompressed because the cpu/miro technology of that day couldn't handle compression on the fly with any decent quality. Editing was done in format friendly compression depending on the media for the project.
Post Reply

Return to “Engine”