aspose file tools*
The moose likes Game Development and the fly likes Building new game, Java 2D question about objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "Building new game, Java 2D question about objects "diappearing"" Watch "Building new game, Java 2D question about objects "diappearing"" New topic
Author

Building new game, Java 2D question about objects "diappearing"

john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

What is the most efficient way to have 2D objects "disappear"?
Here is an example:
If block1 is hit, block1hitmarker = true.
Later in code:

Or is there a better way to do this?
Thanks,
cc11rocks


“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3649
    
  17

Simply don't draw them. What you are doing seems correct, except for some minor issues I have addressed in your other topic.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Building new game, Java 2D question about objects "diappearing"