Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include method of hyperspace transition #12

Closed
6 of 7 tasks
bheiskell opened this issue Mar 21, 2021 · 9 comments · Fixed by #82
Closed
6 of 7 tasks

Include method of hyperspace transition #12

bheiskell opened this issue Mar 21, 2021 · 9 comments · Fixed by #82
Assignees
Labels

Comments

@bheiskell
Copy link
Collaborator

bheiskell commented Mar 21, 2021

Should be based on something like this, but with assets that are either provided by the user or are licensed safely https://drive.google.com/drive/folders/1hH0NHC82FJcXMk4TgPmFpfRh5rlaC0QK

  • Implement a proof of concept with the videos transitioning between scenes
  • If possible, use the transition in and out of hyperspace from the compendium. It doesn't look like this is possible.
  • Copy space, hyperspace, and space combat scenes into my development environment
  • Test that the parallaxia animations are persisted. If they're not, document them somehow.
  • Convert the scenes into a compendium
  • Create and link a form application to launch the transition in and out of hyperspace
  • (Optional) Animate a tile of a planet expanding into the scene during the end of the animation
@bheiskell bheiskell added this to the release-1.0 milestone Mar 27, 2021
@bheiskell
Copy link
Collaborator Author

I've implemented a variation of the guide above, using its assets. The difference is I created two scenes to represent the transition in and out of hyperspace. I took this approach because the fx module used doesn't provide a callback to detect that the video has loaded and has completed. This approach hooks the scene to ensure close to prefect timing. It's going to need a socket synchronization similar to what we did for the credit crawl.

https://gist.github.com/bheiskell/a33b37331b30b4149f9d0b3793852c34

There's still a fair amount left to do for this. Updating the ticket description.

wrycu pushed a commit that referenced this issue Apr 27, 2021
* contains an MVP shop generator (#26)
* contains early WIP hyperspace transition (#12)
@bheiskell
Copy link
Collaborator Author

bheiskell commented Aug 8, 2021

Haven't received any feedback from the asset creator on youtube. I'm not seeing my comment. Not sure why, but at this point, it isn't worth stalling further. It looks like Sequencer has some code that can ease these transitions and provide some assets that we can reference from the module.

@wrycu
Copy link
Owner

wrycu commented Dec 10, 2021

@bheiskell what's the latest here?

@bheiskell
Copy link
Collaborator Author

I'll take a look at this tomorrow.

@bheiskell
Copy link
Collaborator Author

For the posterity, here's a crappy code snippet I used to glue a series of scenes with video backgrounds together in a way that should seamlessly execute for each user. Note, this is local only, but the code works as a macro whether the user can see the scene or not. The reason I'm executing the transitions locally is it allows for timing the transition exactly at the end of the video playback.

let enter_scene = game.scenes.getName("Hyperspace Enter");
let exit_scene = game.scenes.getName("Hyperspace Exit");

let enter_preload = game.scenes.preload(enter_scene.id);
let exit_preload = game.scenes.preload(exit_scene.id);

await Promise.all([enter_preload, exit_preload]);
$("#loading").css({"left": -1000});
console.log("Activating scene");
await enter_scene.view();
console.log("Delaying scene");
//await new Promise(resolve => setTimeout(resolve, 1000));
// Stop the video loop
console.log(canvas);
canvas.background.bgSource.loop = false;
canvas.background.bgSource.currentTime = 0;
await canvas.background.bgSource.play();

await new Promise(resolve => {
        console.log("Resolving 1");
        canvas.background.bgSource.onended = () => {
            console.log("Resolving 2");
            resolve();
        };
    });
await exit_scene.view();
//await new Promise(resolve => setTimeout(resolve, 100));
// Stop the video loop
canvas.background.bgSource.loop = false;
canvas.background.bgSource.currentTime = 0;
await canvas.background.bgSource.play();
await new Promise(resolve => {
        console.log("Resolving 1");
        canvas.background.bgSource.onended = () => {
            console.log("Resolving 2");
            resolve();
        };
    });
await game.scenes.getName("Test").view();
$("#loading").css("left", "");

bheiskell referenced this issue in bheiskell/StarWarsFFG-Enhancements Dec 22, 2021
Adds the two hyperspace transition scenes that will be used in #12.
bheiskell referenced this issue in bheiskell/StarWarsFFG-Enhancements Dec 22, 2021
Adds the two hyperspace transition scenes that will be used in #12.
@bheiskell
Copy link
Collaborator Author

@bheiskell
Copy link
Collaborator Author

Merge request is up. Going to try to do a screen record to demo its usage.

@bheiskell
Copy link
Collaborator Author

Added a credit to the user in discord that provided the Google Drive links for the video and original idea of this feature.

@bheiskell
Copy link
Collaborator Author

hyperspace-transitions.mp4

bheiskell added a commit that referenced this issue Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants