Intro: Capcom Based Card Game in Python
In this project we gonna make a card game Capcom Based using Python and Pygame(I call it 'Capcom VS Capcom'). It's very easy and you can make it in 2 hours and a half.
In Capcom VS Capcom, you have 23 different cards with differents atacks and you play against the computer in the same conditions. The player will always have 3 cards in hand and it should battle with the opponent cards. When the player put a card in battle field, he get another random card. The controls utilized in this game are:
- Z: to put the first card in battle field
- X: to put the second card in battle field
- C: to put the third card in battle field
- ALT: to change the card in battle field
- SPACE: to atack the opponent
In this project, you will need:
- Python 2.7 or higher
- Photoshop or similar
- Cards sprites, backgrounds, the script ands other stuff avaliable ahead.
Step 1: Making the Game Base
In this step, you will need the tileset of cards and some pictures to make different backgrounds.
Create a folder to our game.
The tileset were obtained from Spriters Resource. Here is the link: Tileset. Save it in our folder.
In our game we have 23 cards, so you will select 23 cards from the tileset and cut them of the tileset with Photoshop. Then, rename them as 'carta1.png', 'carta2.png', 'carta3.png', ..., 'carta23.png' and save it in a folder called 'Cartas'. It will be necessary for the code working.*
The same to the backgrounds. Choose 5 400x400 pictures and rename them as 'fundo1.png', 'fundo2.png',..., 'fundo5.png'. Save them in the original folder.*
Now, using Photoshop, Paint or any other, you will make a win screen and a lost screen. Save them in the original folder as 'venceu.png'(Win) and 'perdeu.png'(Lost).*
Obs(*): You can change it according to your preference in the code.
Step 2: The Code!!
Now, we gonna make the code. The funniest step of this tutorial!(Or not...)
I'm putting here the code and you can change it according your preferences. Feel free to change and improve my code!
Step 3: Play and Enjoy!
All finished, you can enjoy our game!
Do not forget to comment!! :D
Here is the complete game: