I am very new to game programming. I am trying to imagine programmatically how to click on a list of objects/images and paste one on a game scenario at run-time.
I am not worry about picking or dragging or pasting. Here is what I have no clue: we know graphic drawing must be coded in game loop. But game loop only draws the number of object/images that are equal to DrawImage function. In what I am doing, I need to have actually a new object with image being added to existing one and programmatically being controllable while loop is going. I thought I have to code a maximum number of objects in the game loop with being disabled conditionally. Then, when I want to have a new one appear, I simply enable one by making it conditionally true. As an example: suppose there are two ducks on a lake. Then you want to add 5 boats. It seems to me that I have to make boat objects pre-programmed and simply make them available conditionally. Is it possible to have a dynamic object creation on run time? I think not, and seem to be a stupid question, but I ask anyway.
Am I confused? Is this the way that it must be done?
I am not worry about picking or dragging or pasting. Here is what I have no clue: we know graphic drawing must be coded in game loop. But game loop only draws the number of object/images that are equal to DrawImage function. In what I am doing, I need to have actually a new object with image being added to existing one and programmatically being controllable while loop is going. I thought I have to code a maximum number of objects in the game loop with being disabled conditionally. Then, when I want to have a new one appear, I simply enable one by making it conditionally true. As an example: suppose there are two ducks on a lake. Then you want to add 5 boats. It seems to me that I have to make boat objects pre-programmed and simply make them available conditionally. Is it possible to have a dynamic object creation on run time? I think not, and seem to be a stupid question, but I ask anyway.
Am I confused? Is this the way that it must be done?