[quote=kapta]a tip if you want your games to look polished and modern, don’t use java2d shapes especially with the default java colors. They instantly make a game look horrid and something from the early 1990’s, not to mention the aliasing. Its possible but tricky to make game look good java2d shapes. IMO its better to go with images, you can easily create basic shapes in something like inkscape and still have them look good (plus its really easy to make images look even better with antialising and gradients).
[/quote]
I definitely need to learn more about images etc - sadly being a bit of an old hand means I’m also a bit old fashioned in my methods to. How much effort do you think it would take to convert the program?
[quote=fruitmaze ]Though to make the game experience more interesting I would like to see more animations.
[/quote]
One issue I’m having is trying to work out how to animate a piece sliding into the grid. I just wanted the wood image to show through the grid and to see the piece sliding down. I can easily do the animation part but I can’t work out how to get the piece to appear behind the grid as it falls.
[quote=fruitmaze ]what does the “Play” option do?
[/quote]
It makes the computer play the next move even if it’s not it’s turn. This is useful if you want the computer to play first or if you’re just stuck on what move to play next.
[quote=fruitmaze ]it would be fun to see some kind of statistics over wins and losses.
[/quote]
Would this be against all people or just against yourself? I’m not sure how often people would continue playing the program once they’ve had a few games - it’s a nice game to play but still just a distraction.
[quote=fruitmaze ]I’m curious, in what way you implemented the AI? Is the algorithm based on a mathematical function to calculate the next move?
[/quote]
It walks a “tree” of moves and then evaluates the positions it comes up with. It’s really no different to a chess program etc. It uses an alphabeta pruning algorithm (a faster version of minmax) and then extends the tree each time until it runs out of time. The evaluation of the individual positions is quite complex and I’m still not convinced by the weightings applied to each part of the evaluation. The weightings are currently being improved by genetic tuning. It also applies a small random factor to the initial moves just to ensure each game is different and interesting.
I’m impressed you won a few games even at the “not bad” level.