How do I implement a real time cutscene in a Java 2D game engine?

Hi!

I’m a developing a game in my own 2D game engine. I have been able to implement the basic stuff and the game is playable. But now I want to include some kind of “real-time cutscene” in the game, stuff you would find in any game this days. I searched the web but I didn’t find anything regarding this matter. Do you know of any good way of implementing this?

The easiest way may be to do an animation containing the whole cutscene, and then adding the animation to the engine, but I don’t think this is the best way to do it. Any ideas?

Thx in advance. ;D

Jos

Use a script. Most professional games do. This way, rendering is exactly the same as your normal game. Initialize Script and set sprite positions -> Render Background -> Render Map and Sprites (Your Actors) -> Update Sprites with script intstructions -> Scroll the background and map -> Start the rendering process over.

As for what scripting language to use, I prefer Beanshell. Its learning curve is fairly small.

Hopefully, this is helpful to you.

Well I made a program for myself to actually do this, although I haven’t needed it yet so it’s not finished. Pretty much it’s like a simple version of Flash where you can animate pen tools, circles, sqaures, imported images, etc. through a frame-by-frame basis or by tweening between keyframes. When you save an animation is create a .anim file, then you can import a java package that lets you run a .anim file directly with Java2D.

It’s pretty useful for saving power and the like, but I’d rather do one in flash, export it as a .mov, and then use Java’s media player to just play that. People have fast computers nowadays.

If you do want to do something like I mentioned, you can make your own animation maker in a few days pretty easily. I might even part with the source code of mine so you can modify it if you want. We’ll see.