Author Topic: In-game cutscenes  (Read 4963 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
So just do
when
--is-key-pressed
----ESC
--unset-cutscene-bars
--[clean-up-cutscene-stuff]

ESC is a reserved key, though, so it should be tied to something else.  Maybe 'Q'.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I think you missed the point Goober.  What I meant is that when the mission is supposed to start a cinematic scene it would be nice if the black bars slowly slide in and out of view like in homeworld (which from his post appears to be how WMC has implemented it) but when the user wants to skip out of a cutscene the black bars should dissappear instantly rather than slowly retracting.

Oh and you can't use Q either. That's the equalise shields button :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
I don't think you understand.  If the key is going to be tied to the key-pressed sexp, it has to be one of the keys recognized by the game.  ESC doesn't work because it shows the "Quit Mission" screen.  I thought of Spacebar, but that fires missiles.  Q for Quit (or perhaps S for Skip) are the least-invasive of any of the key-pressed keys that could be plausibly used.  (Unless you want to say "To skip this cutscene, press '1'".)

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
New stuff:

fade-out
-- milliseconds to fade out
-- color to fade out to(Implemented but not working properly, may need lowlevel function editing)

fade-in
-- milliseconds to fade in
-C

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Quote
Originally posted by Goober5000
I don't think you understand.  If the key is going to be tied to the key-pressed sexp, it has to be one of the keys recognized by the game.  ESC doesn't work because it shows the "Quit Mission" screen.  I thought of Spacebar, but that fires missiles.  Q for Quit (or perhaps S for Skip) are the least-invasive of any of the key-pressed keys that could be plausibly used.  (Unless you want to say "To skip this cutscene, press '1'".)


Ah. Fair enough. I suppose Q isn't bad. 1 would be a bad choice cause a lot of people use that for other things. Can't think of too many times when a player wouldn't want to equalise his shields straight after a cutscene :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Planned camera stuff (Partially implemented):

set-camera-position
-- x point
-- y point
-- z point

set-camera-facing
-- x point
-- y point
-- z point

set-camera-rotation
-- x degrees
-- y degrees
-- z degrees

set-camera-facing-object
-- object name

(Not implemented)
setting-text
-- text
-- lines from bottom of screen

This would draw out text for giving a setting or time 1 letter at a time, as is done in many movies (I think it's done in Apollo 13)

Edit: Goob, are SEXPs calculated before game_render_frame_setup? That's where (ideally) the camera movement code would go. If not, where are they called from in game_frame?
« Last Edit: January 20, 2005, 07:01:03 pm by 374 »
-C

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Quote
Originally posted by WMCoolmon
set-camera-rotation
-- x degrees
-- y degrees
-- z degrees


Would this basically constitute a pan?  Do you plan on adding a time factor so you can adjust the pan rate?  If this is pan, why to you have x, y, & z?  A vector only requires 2 variables.  Am I wrong on my assumption that this is a pan function?
The Trivial Psychic Strikes Again!

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
No; I'm not quite sure how I'll do pans yet, but that would be a change on the y axis. Hopefully I'll be able to peg an optional variable onto the end of the set-camera-* sexps, which will be the time it takes to complete whatever you asked it to do.

So, to do a pan 45 degrees to the left, you'd say something like:
set-camera-rotation
-- 0
-- 45
-- 0
-- 5000

With the two 0s being replaced by the current camera x and z rotations.

Another possibility would be change-camera-rotation, which would rotate the camera from its current position by however many degrees you specify (relative rather than absolute, in other words).
-C

 

Offline Flaser

  • 210
  • man/fish warsie
Quote
Originally posted by Trivial Psychic


Would this basically constitute a pan?  Do you plan on adding a time factor so you can adjust the pan rate?  If this is pan, why to you have x, y, & z?  A vector only requires 2 variables.  Am I wrong on my assumption that this is a pan function?


A two dimensional vector takes 2 arguments - 3D takes 3.
Though if you used polar cordinates then you'd need a radius, an azimuth and iclination angle. If we make all vectors a "unit" long than you can get away with only 2 angles.
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
i think a good idea for a pan is to have the cam_x, cam_y, and cam_z values stored as variables in fred, then use an every-time sexp to move it:

Code: [Select]

 everytime
  =
   
   1
  set-camera-pos
   
   
   
  modify_variable
 
   +
   
   
etc.


tweak dx,dy,dz as necessary
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Quote
Originally posted by WMCoolmon
Edit: Goob, are SEXPs calculated before game_render_frame_setup? That's where (ideally) the camera movement code would go. If not, where are they called from in game_frame?
Yep.  Immediately before, practically.  Here's the game_frame excerpt:
Code: [Select]

[b]game_simulation_frame(); [/b]

// if not actually in a game play state, then return.  This condition could only be true in
// a multiplayer game.
if (!actually_playing ) {
Assert( Game_mode & GM_MULTIPLAYER );
return;
}

}

if (!Pre_player_entry) {
if (! (Game_mode & GM_STANDALONE_SERVER)) {
clear_time1 = timer_get_fixed_seconds();
// clear the screen to black
gr_reset_clip();
if ( (Game_detail_flags & DETAIL_FLAG_CLEAR) ) {
gr_clear();
}

clear_time2 = timer_get_fixed_seconds();
render3_time1 = timer_get_fixed_seconds();
[b]game_render_frame_setup(&eye_pos, &eye_orient);[/b]
game_render_frame( &eye_pos, &eye_orient );
The sexp stuff (among other things) is handled in game_simulation_frame().

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Awesome. :D Thanks Goob.

Now implemented, the stuff I said in the first post. No gradual movement SEXPs yet, unfortunately.

http://www.hard-light.net/forums/index.php/topic,29763.msg607952.html#msg607952
-C

 

Offline Lynx

  • 211
What about subtitles? Are they possible there?
Give a man fire and he'll be warm for a day, but set fire to him and he'll be warm for the rest of his life.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
show-subtitle
-- subtitle text
-- image/animation to display to left of text (optional; default is none)
-- fade in time (optional; default is 0)
-- text redness (optional; default is 255)
-- text greenness (optional; default is 255)
-- text blueness (optional; default is 255)
-- text alpha (optional; default is 255)
-- x position (optional; default is centered)
-- y position (optional; default is at the bottom of the screen)

clear-subtitle
-- fade out time (optional; default is 0)

Would that be good?
-C

 

Offline Lynx

  • 211
Better than I've ever hoped:D
Give a man fire and he'll be warm for a day, but set fire to him and he'll be warm for the rest of his life.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
*goes off to implement it*
-C

  

Offline Cobra

  • 212
  • Snake on a Cain
    • Skype
    • Steam
    • Twitter
this sounds great for Willy_principal's "Battle of Beta Aquilae" demo.

now, make a new D3D version of FRED2 3.6.5 and i could have some fun with it. :D
To consider the Earth as the only populated world in infinite space is as absurd as to assert that in an entire field of millet, only one grain will grow. - Metrodorus of Chios
I wept. Mysterious forces beyond my ken had reached into my beautiful mission and energized its pilots with inhuman bomb-firing abilities. I could only imagine the GTVA warriors giving a mighty KIAAIIIIIII shout as they worked their triggers, their biceps bulging with sinew after years of Ivan Drago-esque steroid therapy and weight training. - General Battuta