Starting to quite enjoy Lua now. Got the game almost to where the GameEditor version
reached and its looking even better already with proper value setting. Check out the
comparison below. The GameEditor version on the left, love2d version on the right.
So pretty much this is how its working currently. We have a card object which we
can reuse to create all the player cards and enemy cards. A card object has the
following values:
- x – horizontal position
- y – vertical position
- image – kinda obvious
- The attack values – wAtk, nAtk, eAtk, sAtk
- owner – who owns this card, the player or enemy
I also have a cardspot object which is reused for all 9 spots on the playmat. This
has pretty much the same properties as the cards. Now in this game you can click to
select a card and click where to place it. Placing a card will set the values of the
card onto the cardspot values. This is so we can setup for other cards being placed
nearby. The cardspot will already have the values which we need to compare to.
Todo
Here is my todo list for this little project:
- Create something to manage the turns
- Code for the enemy turn
- Value comparison on card placement
- Score change depending on the comparison of values
- Display win or lose. If win get to pick 2 cards to add to collection
- Card collection system
- Card selection from collection before a battle
- Main menu/menu system