Card Game: 1 Sprite for each card or 1 Sprite with Frames?

Discussion and feedback on Construct 2

Post » Thu Mar 16, 2017 2:57 pm

Hello!

I was asking myself if it will be better for my card game to make 1 sprite for every card or 1 card object with different frames for each card.

Since it will have many cards, I want the better ordered version to keep it clear.

So, what are your thoughts and experiences on this topic? What is better?
For everyone asking, it is going to be something like an action-wizard card game.
B
13
S
2
Posts: 80
Reputation: 821

Post » Thu Mar 16, 2017 3:38 pm

if you dont have a local variable such as score/value/etc on each card, then go for multiple cards as frames in 1 sprite. you save events later, but the moment you add variables for each card and gets values from it then stuff complicates and is easier to manage having independent sprites.

P.S if your card value is the same as the frame position number then no biggie you can use the frame number as a value for counting cards and setting value of it.
B
78
S
23
G
69
Posts: 1,354
Reputation: 44,027

Post » Thu Mar 16, 2017 3:41 pm

I guess it would be better and MUCH easier if you go with 1 Sprite that holds all the Cards as Frames or Animations. Just remember what card is on what Frame Number. You could use then Local Variables on the Sprite to specify the Kind of card you have spawned or placed. You would have to do some kind of database of course.

But if you want the Long Version without an database and define alle data in each card Sprite then you would have to Group alle those cards into a family. (But believe me, it will take SO MUCH MORE TIME to make dozens of Sprite Objects for the same purpose)
When you just begin learning this Stuff, don't make big things. Start Small.
B
9
S
2
G
1
Posts: 29
Reputation: 1,077

Post » Thu Mar 16, 2017 3:46 pm

One Sprite + Array
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Thu Mar 16, 2017 5:01 pm

Okay thank you for your answers! I will go for 1 Sprite ^^
B
13
S
2
Posts: 80
Reputation: 821


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests