Jump to content

Cutscenes?


SlipperyBrick
 Share

Recommended Posts

many ways. you can do it in other programs and export the animation and render it in realtime with leadwerks. or create simple camera moves directly in leadwerks. you also can render a movie as cutscene and just play it.

 

I created some days ago a dolly zoom in leadwerks and works also fine

 

but IMO for easy things you can do it in leadwerks but for fancy cameramoves and more advanced effects I would use blender/c4d/3dmax.

It doesn´t work... why? mhmmm It works... why?

Link to comment
Share on other sites

You can do it via code in Leadwerks. I'm working on a framework using coroutines that allow you do define cutscenes in your game in a fashion like:

 

-- any function name with Async will do it's thing and return right away
-- any function name without Async will wait to return until a condition is met. however it does return the entire program each frame so everything else runs and it's not blocking. this is the magic of coroutines in lua 
function MyCutScene()
   PlaySoundAsync("Sounds/speech.wav")

   PlayAnimationAsync("player", seq.Walk)

   MoveTo("player", "marker1")
end

 

I have some of these working, but working out some details still. Oddly enough the Async functions cause more trouble and make this harder because they require tracking things still, but need to return from it's function call right away. For example MoveToAsync() needs to start the movement for an entity to a certain location, but return right away. Well, I have to check somehow if the entity got to the location and stop it from moving when it does. Why would you want a MoveToAsync()? Imagine you want to start 2 actors walking down a hall and having a conversation. MoveTo() alone doesn't come back until the actor (1 actor) has reached it's destination. With MoveToAsync() it'll start the process but then return right away so you can start another MoveToAsync() and make both actors move. Then you can PlaySound() to play the conversation.

  • Upvote 1
Link to comment
Share on other sites

You can do it via code in Leadwerks. I'm working on a framework using coroutines that allow you do define cutscenes in your game in a fashion like:

 

-- any function name with Async will do it's thing and return right away
-- any function name without Async will wait to return until a condition is met. however it does return the entire program each frame so everything else runs and it's not blocking. this is the magic of coroutines in lua 
function MyCutScene()
PlaySoundAsync("Sounds/speech.wav")

PlayAnimationAsync("player", seq.Walk)

MoveTo("player", "marker1")
end

 

I have some of these working, but working out some details still. Oddly enough the Async functions cause more trouble and make this harder because they require tracking things still, but need to return from it's function call right away. For example MoveToAsync() needs to start the movement for an entity to a certain location, but return right away. Well, I have to check somehow if the entity got to the location and stop it from moving when it does. Why would you want a MoveToAsync()? Imagine you want to start 2 actors walking down a hall and having a conversation. MoveTo() alone doesn't come back until the actor (1 actor) has reached it's destination. With MoveToAsync() it'll start the process but then return right away so you can start another MoveToAsync() and make both actors move. Then you can PlaySound() to play the conversation.

 

Interesting... I'm looking forward to seeing that framework :P

Link to comment
Share on other sites

Wow Rick thats awesome man! Never knew you could do that in Lua. I am still learning Lua in Leadwerks but I got a basic understanding of it (what functions look like and variables etc). I really like how most of the work you can do to make your game is done in Leadwerks unlike other game engines where you have to swap between programs etc.

Link to comment
Share on other sites

@Rick :

I agree that is code behind the scenes, but for beginners or non programmers coding a complex cut scene will be a pain.

Toos as UDK Matinee, records all your character,effects, camera moves etc ...you make the cut scene without coding anything ans it is ready to be incorporated in your game.

Let's see when LE3 will bring possibility for us to make our own "plugins".

Stop toying and make games

Link to comment
Share on other sites

@Rick :

I agree that is code behind the scenes, but for beginners or non programmers coding a complex cut scene will be a pain.

Toos as UDK Matinee, records all your character,effects, camera moves etc ...you make the cut scene without coding anything ans it is ready to be incorporated in your game.

Let's see when LE3 will bring possibility for us to make our own "plugins".

Even for non coders, it won't take a lot of code to get basic/simple cutscenes into the engine, there is also the option of rendering out a cutscene and playing that, although the file sizes may get large if you plan on having a bunch of cutscenes in the game :S

 

I'm looking forward to the mentioned framework that Rick is working on, and having a shot at getting something going in the engine myself once I have the assets created :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...