So, the other day i was adding up some contents to our project and i've thought that having a cutscene where the main character of the game is either talking or introducing something in the game.
My first approach to this was to create different images of the message box with text and use ifs to check what image to display and uses the removeChild and addChild to change the images and tapping the screen would advance the scene further. But i figured having many images just for the cutscene would be wasteful in terms of memory so i'm kinda lost now. Can anyone suggest a good approach for this?
http://goo.gl/M07xa <- what i'm trying to achieve somehow.
Comments
@xGuilt I saw your post last night and decided to put together a demo using a cut down version of our cutscene framework we are using for our game Neon Force. Our game uses cutscenes based events occurring at specific times within the cutscene, but I've modified it to work as a series of dialog "events" that occur sequentially to form a cutscene.
For example:
I haven't bothered adding characters, but the dialog box at the bottom processes the scripted cutscene and updates the text. The text updates character by character and can be skipped by tapping the screen. When the dialog block is complete, the user is prompted to tap to advance to the next dialog block, which then renders character by character to the screen - which sounds like what you are after.
The script files are no more complicated that a series of dialog tables the cutscene framework processes its way through. It's very straight forward to modify and customise.
There are a number of things you can do to improve this demo, but i've kept it simple to show the basics of it.
I've done a full write up on how to use the demo at our site (including a link to the source) - which you can find here: Link
Hope that helps.
Likes: fxone, plamen, talis, gorkem, krisis, xGuilt
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
I was always saying i like this community but i am changing that phrase of mine to "I love this community"
Especially the text in cutscene rocks:D
Likes: gorkem
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
V 2012-09-10
@krisis Let me know what setup you're running and we'll trying work out what's going on.
Thank you @Jesder
i've faced one problem though, i'm getting a "Bad argument" error on line 28 of cutscene_scene.lua after i included all needed files to my project. It says (table expected, got nil). Based on my understanding, it's supposed to read the userData in the changescene right?
EDIT: i've checked in on it again and found that the "param" being passed is nil. does that mean that the data from main is not being passed on?
EDIT2: Nevermind, i just found out that the sceneManager i was using was different from the sceneManager that you were using
Likes: talis