Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Hippo on November 26, 2003, 02:58:15 pm

Title: Interesting...
Post by: Hippo on November 26, 2003, 02:58:15 pm
I was browsing the DDN site looking for some Reg Hacks for FS1, when i came across the FS2 source code stuff, and downloaded it to see what it actually looked like. I read something that said thee was a partial Demo recorder, like D3... I figured it would be smething that could be interesting to add... If you caould take the code there, finish it, and possibly make it save a mssion as an EXE or something so that you could replay it, and possibly fast forward or pause? It could make trailer-making easier for smaller campaigns, and a fun way to show new ideas, or simply watch missions again... I don't know how much work it would be to do something like this, but I know people have been eyeing it for a while...
Title: Interesting...
Post by: Lightspeed on November 26, 2003, 03:01:57 pm
cool would be to save the actual mission states, so you can later watch it from different point of views. ;)
Title: Interesting...
Post by: Nifelheim on November 26, 2003, 03:20:45 pm
hmmm, replay you say????
May be a good idea, at least we can show off that way...  :D
Title: Interesting...
Post by: Fractux on November 26, 2003, 04:29:04 pm
Ya I was thinking alot about how to record in game demos - primarily because I was trying to think of easier ways to make some movies than having to import the ships to 3ds and render everything.

can you post a link Hippo?

Cheers!
Title: Interesting...
Post by: Flaser on November 26, 2003, 04:30:13 pm
One name:Red vs Blue

Other than that: way to go, with recent additions to the code we could outdo some Volition cutscenes.
Beside, it could used for actually showing stuff from your latest mission during debriefing - I know, wild dreams. At least it opens up tons of possibilities.
Title: Interesting...
Post by: Hippo on November 26, 2003, 04:56:38 pm
[q]From the 'Guided_Tour':

- There was a demo recording/playback system I half-heartedly was playing with at
  one point. Its still in there, in very incomplete form.
[/q]

Code: [Select]
From The thing in the source folder labeled DEMO:
/*
 * Copyright (C) Volition, Inc. 1999.  All rights reserved.
 *
 * All source code herein is the property of Volition, Inc. You may not sell
 * or otherwise commercially exploit the source or things you created based on the
 * source.
 *
*/

/*
 * $Logfile: /Freespace2/code/Demo/Demo.h $
 * $Revision: 3 $
 * $Date: 3/29/99 6:17p $
 * $Author: Dave $
 *
 *
 * $Log: /Freespace2/code/Demo/Demo.h $
 *
 * 3     3/29/99 6:17p Dave
 * More work on demo system. Got just about everything in except for
 * blowing ships up, secondary weapons and player death/warpout.
 *
 * 2     3/28/99 5:58p Dave
 * Added early demo code. Make objects move. Nice and framerate
 * independant, but not much else. Don't use yet unless you're me :)
 *  
 *  
 * $NoKeywords: $
 */

#ifndef _FS2_DEMO_SYSTEM_HEADER_FILE
#define _FS2_DEMO_SYSTEM_HEADER_FILE

// -----------------------------------------------------------------------------------------------------------------------------
// DEMO DEFINES/VARS
//

// compile in the demo system
#define DEMO_SYSTEM

struct object;
struct ship;

// an error reading or writing the demo file
#define DEMO_ERROR_NONE 0 // no error
#define DEMO_ERROR_GENERAL 1 // general problem
#define DEMO_ERROR_FRAMESIZE 2 // frame size was too big (> 32k)
#define DEMO_ERROR_DISK_SPACE 3 // out of disk space
#define DEMO_ERROR_DISK_ACCESS 4 // problem accessing disk
#define DEMO_ERROR_VERSION 5 // bad version #
#define DEMO_ERROR_MISSION 6 // different mission file checksums
extern int Demo_error;

extern int Demo_make;

// -----------------------------------------------------------------------------------------------------------------------------
// DEMO FUNCTIONS
//

// do frame for the demo - start for the frame
int demo_do_frame_start();

// do frame for the demo - end for the frame
int demo_do_frame_end();

// initialize a demo for recording
// NOTE : call this after loading the mission and going through the briefing, but _before_ physically moving into the mission
int demo_start_record(char *file);

// initialize a demo for playback - calling this will load up the demo file and move the player into the playback state
int demo_start_playback(char *file);

// finish the demo, whether recording or playing back
void demo_close();

// if we should run the simulation for this object, or let the demo system handle it
int demo_should_sim(object *objp);


// functions for posting critical events to the demo system ------------------------------------------------------------

// post an object dump event (only used internally)
void demo_POST_object_dump();

// post a primary fired event
void demo_POST_primary_fired(object *objp, int banks, int linked);

// post a unique message
void demo_POST_unique_message(char *id, char *who_from, int m_source, int priority);

// post a builtin message
void demo_POST_builtin_message(int type, ship *shipp, int priority, int timing);

// post an object create message
void demo_POST_obj_create(char *pobj_name, int signature);

// post a warpin event
void demo_POST_warpin(int signature, int ship_flags);

// post a warpout event
void demo_POST_warpout(int signature, int ship_flags);

// post a departed event
void demo_POST_departed(int signature, int ship_flags);

// post a ship kill event
void demo_POST_ship_kill(object *objp);

#endif
Title: Interesting...
Post by: redmenace on November 26, 2003, 06:35:44 pm
especially things like ship trails would be great, and the smoke trails and of course the shine maps.