-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Milestone
Description
This ticket is a WIP
Motivation
Diving in to developing a game, when I want to create a new entity in the game, I have to create a model to represent it, set up listeners to make sure it is instantiated properly, manually set it to the physics manager etc... Realistically, I should be able to define a class which implements a Model interface, and then be able to create objects in TMX with the same type, and it should appear.
For example:
interface GameObjectModel<T> {
void initialize(ModelConfig<T> someMap){ default imp }; // This would be injected from the values provided in tiled, and the method would have default behaviour for nulls.
}
Also, behaviour resolution between two objects should be handled without having to know about game objects. Something like:
interface BehaviourStrategy<SubjectType> {
BiConsumer<SubjectType,Object> getBehaviourStrategy(Class anyClass){
// returns the correct method for resolving collision
}
}
Ideally, I feel like we don't need to ever handle game objects. This means we can build entire Java models, and everything else is abstracted away
Reactions are currently unavailable