Playing Cards, wait isn't that the point of the game?
Author: Marie Halper
Posted on 6/14//2024
This week, I decided to finally tackle the biggest aspect of the game yet, placing cards. Now I know how this sounds, shouldn't those have been the main focus? What have you spent all this time doing instead then? Well be as it may this is my blog post, not yours reader, so sit down and listen. While yes, placing cards is 90% of the game, the other 10% such as getting cards to attack and getting turns to work has a lot more involved then the actual playing of cards, so I elected to work on those first. Back to the main point, this week I worked on placing cards and having them exist in hand. Firstly, I decided to create the hand, and make it so the player could draw cards.
We decided to limit the player's hand to 5 cards, and to make it so they cannot gain cards when they already have 5, which incentivizes the player to make due with what they have instead of holding off for better cards. I set them up so that the player can only select a card if it is a proper card, instead of if it is a card slot.
Once I got that working, I spent time figuring out how to get the cards from the hand to the field, and the method I decided on was having each card have an ID, that can be used to set that card's data. This way instead of moving game objects around, I can have a set amount of objects, and just modify their values.
I then worked on getting the data bank of card info set up. Since I only needed one card for now to test, I made one with all the required data filled in, and used it to test cards being transferred.
Finally, I needed the game to check if there was a card in hand selected, and a card slot on the field selected at the same time, and if there was, then the card from hand would have its values be set to the card slot on the field, and it would then reset the hand slot's data to be blank to take in new cards.
It is a bit rough, but at least for now, it works exactly as needed. In addition, to test drawing cards to hand, I created a draw cards method that adds an instance of the test card's data to the hand
Trading Card Dungeon
Status | In development |
Author | Tapped Card Productions |
More posts
- Controls, Expectations, and What is PossibleJun 08, 2024
- Health Bars, The Good, The Bad, and The Missing OptionsMay 29, 2024
- Latest Debug: Problems with CursorMay 29, 2024
- Remembering how to Make a Game ManagerMay 25, 2024
- UI or 3D object, What to do With The GameboardMay 18, 2024
Leave a comment
Log in with itch.io to leave a comment.