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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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: 185
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: 185
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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: 2D animation/transparency question
 
Similar Threads
creation of dynamic chessboard with user interactivity using javascript.
Help!
chess programming
Having problems in unMakeMove() for chess
I want to tokenize a String? How do I ignore the spaces?