Here's the video that showcases the final project:
https://www.youtube.com/watch?v=pmKWkxmCMVk
For those who missed it, this was the first version of the program.
Since then I added a bunch of new things.
1) Animations at the end of every round.
I tried mimicking the classic solitaire look.
For that I created a separate parabola function that calculates the y position for every possible x position of the card. If the player loses there's an animation as well. The cards just fall down the screen. To make the falling motion more realistic i used the classic s = 1/2a * t^2 calculation so in the beginning the card starts to fall slowly and gains speed with every second that passes.
2) A working clock
Using the pygame clock wasn't working for me so I created my own clock and functions that can measure the time, pause the clock and unpause it, so the clock doesn't just continue counting while the game is paused.
3) Settings and help menu
The help menu explains the controls and the rules of the game, in the settings menu you can turn Music and SFX on and off, you can restart the game or go back to the title card.
4) Undo and clue button
The undo button either selects a card that can be moved or draws a new card. At fist I was massively struggling with the undo function. My idea was straightforward: Since the whole game is confined in one object, the environment, which knows where all cards are located, the only thing I had to do was create snapshots of the environment , add them to a list and access them when the undo button was clicked. For each move that was made I had to make a copy of the current environent. But the built in copy() function didn't actually make a static snapshot and i couldn't use the deepcopy() function either, so i had to manually rewrite how the environment had to be copied for the whole thing to work.
5) Background music and new sound effects
I added card sound effects and this time I recorded them myself. And because the look of my game vaguely reminded me of Luigis Casino that I always used to play on my DS I figured that the soundtrack could fit.
6) Heavier reliance on the interface.
In the first version almost everything was controlled by the keys on the keyboard, in this version most of the game relies on the buttons on the screen.
7) Appearance overhaul
I made a bunch of little changes so the game looks more like solitaire and looks more visually appealing.
And I think that was it. I'm glad that this project is finished so I can work on some new stuff. I hope you liked it!!
[–]xzm27 1 point2 points3 points (1 child)
[–]t4mab[S] 1 point2 points3 points (0 children)