Yeah, basically, I want to make a class library with my different game objects: room, object/sprite, inventory item.
Then, I would put the sprite's behavior script (probably event capture) into an object that inherits my Sprite class.
Also, I would have multiple rooms inherited from Room with event capture triggered behavior (i.e., if ego is on a certain box on screen, if a certain command is activated, etc.).
Something similar for inventory items.
Then, I'd refer to these objects through the main application, probably in the same way AGI refers to them, by placing a number in their name, so (pseudo: run.room.logic("Room"+room_no+".class")).
In the Java book I'm using for reference and learning, one of the projects is creating a VM, but I think that the Java VM should already be able to handle all of my needs, and I'm not sure if I can afford the run-time overhead.
|