For the past year during my spare time, I have been working on re-creating the Windows 98 version of Solitaire using Java.
Prior to working on Solitaire, I made a few others board games while re-using a code base that I have built up over time that makes Swing a bit more bearable and re-usable. I recently remade a Windows 98 version of Minesweeper, available on my GitHub as well.
I have decided to try and keep an updated blog on this website, posting updates about my progress as a Computer Scientist. Hopefully, the work that I am doing is able to help motivate others in completing their own personal projects, and I hope everyone is able to make use of some of the work that I am doing.
Before I go into where I am at right now for the Solitaire remake, I want to share with everyone a bit of background history.
For the past two years since I left my full-time job working at a gaming company in Montreal, I decided to go back to my roots and work on some games that would teach me the fundamental concepts of completing a project, among other core experiences such as not losing focus on a task, and always moving forward even when there are roadblocks. Fast-forward to today, and I have completed a few games such as Tic-Tac-Toe, Checkers, Chess, Minesweeper, and am currently working on a Solitaire game.
I have been learning a lot about myself during my experiences making these games, and I am using that knowledge to make bigger and better things, and posting it all on GitHub for everyone to use, hopefully to one day make an impact in other peoples lives. I could spend a lot more time talking about myself and my journey, however right now at this time I want to show off a bit of the Solitaire game that I am working on and where I am at right now. Maybe in other blog posts, I will go a bit more into my own details as a Computer Scientist.
This is what the game looks like right now in its current state. I will go through the features that I have implemented so far, and will then go through what I am working on right now.
So far I have implemented the following.
1. The options menu.
I have implemented everything in the options menu except for the `Draw Three` feature, and the sub-features associated to `Draw Three` such as the number of times you can go through the deck, scoring with respect to `Draw Three`, etc.
You can play a timed game, change the visibility of the status bar at the bottom of the game, you can go from an outline view to a non-outline view when dragging the cards, and you can choose between three scoring modes along with a cumulative scoring option when playing in `Vegas`
2. Outline vs non-outline dragging
Here is outline dragging and non-outline dragging when playing the game. I tried to make the outline highlight work the same as the original game, which was simply by using an XOR bit-mask whenever a collision between the border of the proxy card was dragged over a particular card, as you can see with the Queen of Diamonds and the Jack of Spades.
Here is a non-outline drag. Notice that the card is moved and you can see the backside of the card that it was originally hiding.
Here is a list of other features that I worked on so far.
- Setting up the board and where the cards will be positioned
- Being able to cycle through the cards at the top-left
- Being able to drag a card from one location to another
Being able to place a card somewhere, the logic and architecture used to detect when this is possible
and to place the card or put it back where it started from
- Placing a card on the foundation stacks (the four placeholder squares that you see right now), and determining if the game has been won
The options menu shown above
- Timed game, which will show at the bottom right of your screen when you have a status bar that is visible
- Standard which uses some basic rules, I just had to research them and implement it
- Vegas scoring. I also looked this up and implemented it, also some slight formatting changes
- Cumulative scoring, this wasn't too difficult to implemented, it was just a matter of persisting your score when playing a new game
- Saving the options chosen within the options menu, and when certain options would change such as how many cards were drawn, a game reset would occur
- Outline dragging. This was by far one of the most interesting things that I implemented throughout this game.
- Normal dragging. I implemented this first before going into the outline dragging mode
- Double-clicking on a card to auto move it to the foundation pile (if applicable)
- Lots of bug fixes along the way
Right now I am working on being able to choose which deck image you want to play the game with. I have the images on hand and I have imported them into my game, all that is left is to mock up the dialog window and position the images similar to the original game.
So far this is where I am at with my game. You can always follow my progress by following the game located at https://github.com/danielricci/solitaire
Sorry that I did not go into any technical details, this is my first blog post and I am nervous enough as it is. I hope you all enjoy reading this, and I will try to answer any questions in the comments.
Take care, until my next blog post.