aspose file tools*
The moose likes Java in General and the fly likes 2D animation/transparency question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "2D animation/transparency question" Watch "2D animation/transparency question" New topic
Author

2D animation/transparency question

Mich Robinson
Ranch Hand

Joined: Jun 28, 2009
Posts: 250
    
    1
I've just written a simple game of Connect 4 but I can't work out how to make the pieces slide in behind the grid to make things look more real. I currently have the grid displayed on a wooden background which I like and I'd also like the image of the wood to show through the holes in the board. Any ideas?

Obviously I could just display the pieces over the top of the grid but this stops me from being able to animate the sliding of a piece in behind the grid. Not sure if that made sense but here's the game - how do I simulate sliding pieces in at the top? I'm just a bit stuck.
Mike


Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Mich Robinson
Ranch Hand

Joined: Jun 28, 2009
Posts: 250
    
    1
Solved by using the paint.net to generate images with transparent areas. I then just drew the background image first, then drew the pieces on top of that and then finally drew the grid with the transparent areas on the top. It all worked fine.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 2D animation/transparency question