Prof. Monster's SlideShow Player

Hi Blenderheads,

Prof. Monster just finished this simple SlideShow Player (developed in 2.62).
It allows you to define a camera animation and play it sequences in-game.

The Demo-File is a SlideShow by itself. Just give it a try.
P to start the game (cursor in 3D view)
Space to continue
ESC to exit

You can use the Camera from the demo for your own projects. Simply replace the keyboard sensors with the controls of your choice.
Please do not forget to add a list of keyframes at the property “frames” this tells the player when to stop.
[

Many thanks to the contributors of outdoorItems which made this little demo look so nice.

If you have questions do not hesitate to ask.

Edit:
updated to version 2.5 to support immediate switching to a certain frame (via property “frame”)
PlayerDemo_v2.5_bge2.73.blend

updated to version 2.4 to support starting at another given frame (via property “frame”)
updated to version 2.3 to support non-ascending frames
updated to version 2.2 to support starting with the first given pose
updated to version 2.1 to support looping animation
updated to version 2.0 to support BGE 2.73

Attention: this is version 1.0:
PlayerDemo.blend (435 KB)

Thanks Monster, pretty cool. :slight_smile:

I’ll try it, thanks for pointing it to me!

Edit: I’ve seen it :slight_smile: I made a blender presentation on 2010 more or less like this :slight_smile:

Since a while the player does play the first section of the sequence only. This is because of changes to the ActionActuators behavior. It resets the frame after finishing the playing. Player v1.* relies on that frame and can’t determine what the last played sequence was.

Therefore the player v2.0 is redesigned to work with 2.73 (and maybe earlier, but not pre 2.50).

The setup and behavior is as before (see post#1).

Attachments

PlayerDemo_v2.0_bge2.73.blend (460 KB)

This is cool. Thanks Monster!

Version 2.1:

  • optional property “looping” allows to repeat the action after the end (and vice versa).

Indeed this makes only sense when the animation forms a loop :spin:

Attachments

PlayerDemo_v2.1_bge2.73.blend (440 KB)

One update after the other :):

Added support to start the sequence at a different frame then the current/initial one. This allows to use the same animation but start with different frames.

This one requires a small additional setup:



The Module field gets: player.setStart

Attention: The BGE will always start with the initial pose. This might result in a short but noticeable jump/flicker/hickup. If you do not want that you should tasteful hide this effect e.g. By blinding the camera with a black plane when starting the scene. You can move or delete this plane via logic bricks. This way only the first frame is black. Alternative: Fading out black material :p.

Attachments

PlayerDemo_v2.2_bge2.73.blend (437 KB)

This time a real bug:

Removed the sorting of the frames. This enables you

  • to play the animation reverse e.g. “40 20 0” or
  • jump back and forth e.g. “0 30 10 40 20 60” or
  • play a loop but start with an higher frame number e.g. “20 30 0 10”

Attachments

PlayerDemo_v2.3_bge2.73.blend (437 KB)

Another update.

I skip version 2.4 - it adds the support to start at any given frame number of the list by setting a property “frame”.

e.g.
frames: “0 20 40 60”
frame: 20

-> starts at 20 and allows to navigate to 0 and 40…60

version 2.5 - allows to dynamically set that property while the game is running. Be aware it immediately switches to the given frame without animation.

You will need additional configuration to do so:



The module field is: player.setStart

How you set the property (string or number) is up to you. The value must match one of the values from the “frames” property.

The property will change … but shows the frame the animation started the last time.

Attachments

PlayerDemo_v2.5_bge2.73.blend (438 KB)