Jump to content

  • Log In with Google      Sign In   
  • Create Account

pre-rendered cutscenes in LUA?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 TeamBiohazard   Members   -  Reputation: 97

Like
0Likes
Like

Posted 09 February 2012 - 07:15 AM

Hello all,

How can I add a pre-rendered cut-scene / movie in LUA?
such as many people do, the user triggers the zone and the movie plays...
is this even possible ?

cheers

Sponsor:

#2 FLeBlanc   Crossbones+   -  Reputation: 3101

Like
0Likes
Like

Posted 09 February 2012 - 09:27 AM

This question doesn't really make sense. There isn't any kind of AddCutSceneToGame module available for Lua. This kind of functionality is 100% the responsibility of the underlying game engine code that you write, and what kind of functionality you expose to Lua.

#3 TeamBiohazard   Members   -  Reputation: 97

Like
-3Likes
Like

Posted 09 February 2012 - 09:42 AM

it does make sense. every game has a movie / cutscene. just by adding the file (.avi, .wmv, .mpeg, .mp4, .ogg) and add it to the code. .
it could be simple, and it has to be possible. I'm using leadwerks engine.
and you lame sarcastic (joke) reaction with:

AddCutSceneToGame is really childish. every person know that it's not that simple. I even wasn't asking for


that kind of command and / or code. and a cutscene isn't always pre-rendered most of the time it's live action. but I want to add a video file (if that's the easy talk for you.)
I hope I was clear enough for you to understand.



cheers



#4 FLeBlanc   Crossbones+   -  Reputation: 3101

Like
1Likes
Like

Posted 09 February 2012 - 11:17 AM

I don't want to start a fight here, but that is exactly what you were looking for. I quote:

How can I add a pre-rendered cut-scene / movie in LUA?


Word for word your original question. No information in the OP about the engine or framework, just a simple How can I add a pre-rendered cut-scene / movie in LUA?. Which is a question that, without additional crucial information, makes no sense.

The thing about Lua is, it's just a language. It only does the basic things you expect a language to do. Expressions, code execution, etc... On it's own, it doesn't do much at all. The intermediate functionality, ie handling files, handling strings, math functions, etc... are all added as external libraries or modules. And anything more advanced than that also has to be added as a module of some sort.

There are 2 basic use cases for Lua: extending via modules that can be loaded via require from the default command-line executable provided with Lua distros, or embedding the Lua scripting environment inside another executable and exposing external engine functionality via binding code. In either case, the only way to add advanced functionality (such as adding and triggering cut-scenes) is through the use of extensive amounts of external code. All the 'guts' of such a system are highly dependent upon the engine, so not including any information on your engine and environment is a good way to get so-called joke responses.

So now that we know some actually relevant info (you're using Leadwerks), then the place to start is the Leadwerks documentation. How would you play a cutscene in Leadwerks without the use of Lua? When you've figured that out, analyze that code and figure out the best way of writing bindings to Lua so that the code can be called from a script. It's not a trivial task, given that a cutscene needs to mesh well with game state, UI, main-loop execution, etc...

I recommend you stow the rage, take some basic primers on binding code to Lua, and browse the Leadwerks documentation to learn how to play video files. Do that, and you'll be able to write your own AddCutSceneToGame module.

#5 Hodgman   Moderators   -  Reputation: 30385

Like
0Likes
Like

Posted 11 February 2012 - 12:41 AM

If you're using leadwerks, then you can only use Lua to control the functions that leadwerks has provided to you. If leadwerks hasn't provided functionality for playing video files, then you're stuck until they add this functionality for you.

As is, this isn't a question about Lua, but a question about the leadwerks engine.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS