This first post contains no code, just what i want to do and asking the best way to do this. I am familiar with swing however i havent used it much.
Future posts will be my code to be approved or critised.
It involves using timers within a game.
1) An item (eg loaf_of_bread) is on the screen
2) Player picks up item, item disappears , a timer is started eg 30 seconds.
3) After 30 seconds, the timer is destroyed and the item is remade and displayed.
My thoughts are, to create an "itemManager" class containing an array of "item". The player picking up the item calls "addItemToManager(variables go here)".
The item is added to itemManager array which initiates a timer which is used to regenerate the item on the screen, based on the variables.
Then the best thing would be for you to list all the methods you have identified so far, and to evaluate each of them in terms of whatever "efficiency" means to you. You could post them here if you would like discussion about that process.
Joined: Jul 28, 2011
This is what i have so far for me to be advised on.