Let's play animations inside the game engine. Add an object, make sure it has enough faces if you're animating with bones so it doesn't look worse than PS1 graphics lol. Now, animate it. If you don't know to animate it, no problem.
Set the editor type to Timeline and bring your timeline bar to frame 1. Move it or rotate it and keyframe the Location or Rotation by pressing I keeping your cursor on the 3D workspace. Let's stick with Location for now. You'll brought down with list of keying sets, click on Location. Now bring your timeline bar to frame 60 and then keyframe it again.
If your framerate of the timeline is set to 60 then you're having an animated object that lasts for a second! Before moving to logic editor, Set the editor type to Dope Sheet. Now set the editing context from Dope Sheet to Action Editor
Now you'll see your object name and Action named next to it. If your object name is Cube you'll have the animation named as CubeAction
Now you have an animated object or if you already have one that's cool! Ok so...Go to logic editor and add an Always sensor. Before adding a controller, add an Action actuator. Click on the empty field with the dope sheet icon on it and select your animation. It looks something like this.
Now connect that always sensor to your action actuator and boom! The And controller shows up and connects automatically. We made the animation lasting for a second which was 60 frames. Set end frame on the action actuator to 60 and it sets to 60.0 as its floating point integer. It doesn't matter for now what floating point integer means xd.
Press P and there you're animation is playing!
You might wonder "Why the heck isn't my animation playing always??" No worries, just set the action playback type from Play to Loop End And run the game, your animation is playing in a loop!
Now try setting the playback type from Loop End to Ping Pong. Now your animation should be playing in normal and reverse direction like below.
Ah, I don't think your animation is playing, because the data from always sensor is triggered only once. Turn on TRUE level triggering in the always sensor. This sends the data instantly and always until the sensor isn't triggered, which causes the action to play in ping pong mode.
Now run the game, is it playing?