Best approach
-
I am recreating a collectable card game and need to make the game easily updatable. Each card has its own effects which i will have to write specific functions for and the problem arises when new cards need to be added and the application will obviously not have the functionality for them. Could i somehow write a dll for each card including the new functions or add the new functions to an existing dll, but then how would the app know about the new functions. As you can tell i have not got a clue :)
-
I am recreating a collectable card game and need to make the game easily updatable. Each card has its own effects which i will have to write specific functions for and the problem arises when new cards need to be added and the application will obviously not have the functionality for them. Could i somehow write a dll for each card including the new functions or add the new functions to an existing dll, but then how would the app know about the new functions. As you can tell i have not got a clue :)
In a situation like this where it's impossible for the calling application to know what changes you are going to implement in the callee, you need to provide a standardised method for managing it. You ensure that the card actually handles all of the effects and knows how to call them in response to some stimulus from the calling application. Take a look for plug in articles on this site to get an idea as to how others have handled this in the past.
Deja View - the feeling that you've seen this post before.
-
In a situation like this where it's impossible for the calling application to know what changes you are going to implement in the callee, you need to provide a standardised method for managing it. You ensure that the card actually handles all of the effects and knows how to call them in response to some stimulus from the calling application. Take a look for plug in articles on this site to get an idea as to how others have handled this in the past.
Deja View - the feeling that you've seen this post before.