Page 1 of 3

Cinematics in dynamic scripts

PostPosted: 19 Nov 2013, 09:31
by Lewin
This post is from our Google Code page where I commented on Andreus adding a command to center the player's screen. We want to get your feedback on these ideas, especially from the map authors who would use it.


I think blocking player input/scrolling should be done fairly obviously, otherwise it will probably be confusing to the player if his input is blocked without any indication. For example in other games they enter a cutscene/cinematic mode which is shown to the player by dimming or removing controls and/or putting a black bar at the top/bottom of the screen.

I think we should have commands like this:
StartCinematic - Blocks all player input and makes this obvious by dimming controls
EndCinematic - Returns control to the player
CenterScreen - Instantly jump screen to location (and zoom?)
ScrollScreenTo - Scrolls screen smoothly to a location in a given amount of time (with ease-in ease-out acceleration?)

And maybe stuff like:
HighlightUnit/House/Group - For showing objectives/allies/targets
Subtitles/narration (text overlay/PlayWAV is enough?)

Then I can imagine at the start of a mission playing a cinematic to explain the objectives or highlight targets.

Re: Cinematics in dynamic scripts

PostPosted: 19 Nov 2013, 11:25
by MpranavM
Nice idea

Re: Cinematics in dynamic scripts

PostPosted: 19 Nov 2013, 18:39
by sado1
Will it be possible to use these commands in multiplayer? Will I be able to start cinematic for a certain player only, making him unable to move his units, while his enemy is free to do that? (Pleeaase? :) )

Re: Cinematics in dynamic scripts

PostPosted: 20 Nov 2013, 01:12
by Lewin
Will it be possible to use these commands in multiplayer? Will I be able to start cinematic for a certain player only, making him unable to move his units, while his enemy is free to do that? (Pleeaase? :) )
Yes definitely :) Start/EndCinematic will only be applied to the player you specify so you can control it separately for each player. What is your idea? Turn based KaM? :P

Re: Cinematics in dynamic scripts

PostPosted: 20 Nov 2013, 04:54
by Krom
OMG, turn-based KaM is coming! :D

*Seriously though - that would be awesome to try, but the TBS pace is going to kill the game that is already slow-paced :)

Re: Cinematics in dynamic scripts

PostPosted: 20 Nov 2013, 06:27
by sado1
Yes, that indeed is my idea. It's already possible to do with a few clever tricks. Builder GUI troop control (Actions.PlanRemove returns boolean, so I can detect if someone had placed a plan, by scanning through all the tiles) + using AI players for displaying our own troops (so we can't move them on our own). Cinematic scripts and a few plan-related scripts like States.On*PlanPlaced would be nice though, to make the script a bit more optimized and allow me to register 3 different types of clicks (each for road, wine and field plan). Not to mention, that currently with use of extra AI players, the gamemode could be 1v1 only, maaaybe 2v2 if I planned things well; when I can stop using additional AI in favor of stopping the game for a player with cinematics, I'll have a few more slots there, and maybe it also will mean multiple fights at once?

Re: Cinematics in dynamic scripts

PostPosted: 20 Nov 2013, 22:47
by RandomLyrics
CenterScreen (aPlayer, X, Y, aTicks: integer) aTicks - durtion of camera move from players actual X,Y to specified X,Y (example aTicks= 0 - instantly ; aTicks = 50 - smooth ( if the X,Y are enoungh close ))
ZoomScreen(aPlayer, aZoom, aTicks: integer) aTicks - the same

Experimental/Look-improves
- ShakeCamera(aPlayer, aStrength: integer)
- StopShakeCamera(aPlayer: integer)
- CameraAngle(aPlayer, aAngle, aTicks: integer) (from F11 grphic tweaks)
- FadeOn(aPlayer, aTicks, aTransparency: integer; aColor: String) - covers screen with specific mask
- FadeOut(aPlayer, aTicks) or FadeOut(aPlayer, aTicks, aTransparency: integer; aColor: String)

Wait Action is necessary in games-movie, but as i know it quite impossible.(without OnTick)
And maybe stuff like:
HighlightUnit/House/Group - For showing objectives/allies/targets
Subtitles/narration (text overlay/PlayWAV is enough?)
This is good, I also would add ClearScreenSubbtitles

Re: Cinematics in dynamic scripts

PostPosted: 21 Nov 2013, 09:34
by dicsoupcan
This is so awesome. It makes me consider if i want to edit my campaign a bit or not :D

Re: Cinematics in dynamic scripts

PostPosted: 25 Nov 2013, 00:57
by Lewin
I've implemented CinematicStart, CinematicEnd and CinematicPanTo (moves the screen). Cinematics block user input. During cinematics you can't select units or houses and only the menu and statistics buttons are enabled (build and distribution of wares are disabled). You also can't move the screen.

However, currently there is no clear indication that you are in a cinematic. User input is suddenly blocked with no warning or indication, which is kind of confusing. The same when the cinematic ends, there's no indication so you don't know when you can start playing again. Most games make it clear when you enter/leave a cinematic. Here are the methods I've seen used:

- Fade screen for a moment when the cinematic starts/ends
- Remove most of the user interface (we can't really do this because we need to keep at least the menu)
- Place black bars at the top and bottom of the screen (example). This would cause us issues on small screens and I dislike it because it wastes screen space and makes your viewing area smaller.

None of these ideas fit well with KaM. Fading is probably the most applicable but I'm not sure how it would work. Does anybody have any other suggestions or ideas? Consider the way cinematics will be used: to highlight targets, to block the player while a story part of the mission is shown, for turn based scripts, etc. (maybe you guys have other ideas too?) Hopefully we can figure out a way to show the player when the game is in a cinematic :)

Re: Cinematics in dynamic scripts

PostPosted: 25 Nov 2013, 04:55
by Krom
Fading all UI controls but the menu button and chat button sounds like the best option to me

Re: Cinematics in dynamic scripts

PostPosted: 25 Nov 2013, 06:35
by Lewin
Fading all UI controls but the menu button and chat button sounds like the best option to me
That's only the 3 main buttons (not very noticeable), and in a battle map they are already faded. Or did you mean something else?

Re: Cinematics in dynamic scripts

PostPosted: 25 Nov 2013, 08:16
by Krom
I meant fading everything (making it darker?): toolbar background, minimap, etc.

Re: Cinematics in dynamic scripts

PostPosted: 25 Nov 2013, 10:32
by pawel95
Yeah not sure in which game i saw that. But making everything dark, except the "window" looks like a really good idea. So the player knows that he cant move soldiers for example, but has just zo enjoy the movie.

Re: Cinematics in dynamic scripts

PostPosted: 25 Nov 2013, 13:51
by dicsoupcan
Or you can do it like in red alert, remove the cursor during the cutscene and block the overlay. As far as i know in most ingame cutscenes the cursor is removed as an indication that you cannot do something for the time being.

Re: Cinematics in dynamic scripts

PostPosted: 25 Nov 2013, 20:10
by Bence791
I love those! Very nice :D
Lewin (or Krom), could you please update the Dynamic Scripts Wiki on the codepage? Just because I don't know what parametres those actions need. :mrgreen: