How to have an app object hold a table of sprite objects?

I would like to have two files, one holding an app object (with app.title, app.version, app.playSounds and so on), and one holding a sprite object (with sprite.x, sprite.y, sprite.isPhysical, sprite.type, sprite.energy, sprite:handleSpecialBehavior() and so on). The app object should be global, instantiated from an App class with its own set of properties and methods.

How do I structure my code, which commands do I use, so I can create this App class and the Sprite class to fill the app.sprites table? E.g. something like

app = {}

function initApp()
app.title = ‘Hello’
app.sprites = {}
app.sprites[1] = Sprite:getNewSprite()
app.sprites[1].type = ‘warrior’
app.sprites[1].x = 100
– etc.
end

… except I don’t know if that’s at all how to go about this.

Thanks for any help! [import]uid: 10284 topic_id: 3690 reply_id: 303690[/import]

PS: My naming of “sprite” is unrelated to the spritesheets module, that is coincidental. [import]uid: 10284 topic_id: 3690 reply_id: 11339[/import]