Original Post
Hello,
First, I should note that I am new here, so it's nice to meet everyone.
I am working on a 2D game engine for the Android OS and I am using LuaJava as a JNI wrapper for the Lua library.
The way I have my engine planned out is that it will use a traditional component-based architecture, where each component will essentially be a script. The game objects will each have a collection (represented by a linked list) of components and, when the game object is updated, it will go through and call the update method of each of its components, thus calling the update method of the script laded for each component.
My problem is that I cannot, for the life of me, figure out how to all for dynamic script names. That is, since the name of each script file is not known ahead of time, how can I make the process of loading and compiling a script name independent?
First, I should note that I am new here, so it's nice to meet everyone.
I am working on a 2D game engine for the Android OS and I am using LuaJava as a JNI wrapper for the Lua library.
The way I have my engine planned out is that it will use a traditional component-based architecture, where each component will essentially be a script. The game objects will each have a collection (represented by a linked list) of components and, when the game object is updated, it will go through and call the update method of each of its components, thus calling the update method of the script laded for each component.
My problem is that I cannot, for the life of me, figure out how to all for dynamic script names. That is, since the name of each script file is not known ahead of time, how can I make the process of loading and compiling a script name independent?