The way I implemented the animations it's quite easy and straightforward: I did a class that can handle tilesets, that way, you specify the Height and Width of a tile (this maybe can be a limitation, the tiles of the tileset must be the same size, but for now is sufficient
), and the number of Columns and Rows of the tileset. Then, I do something like this to define an animation:
// 0,1,2,3 are the frames of the animation
sprite.setAnimation("0,1,2,3", "default");
// tons of useful code...
// play the animation
sprite.playAnimation("default");
I have no troubles to give you the sources if you want it.
For the globals, I think a nice way will be have a struct "Globals" with all the data you need, and then just add two functions to Engine, "getGlobals()" and "setGlobals()", I think it's a little more elegant than just using quick & dirty globals.