Tables or Attributes
Hi everyone, I'm not looking for anyone to code my project, but I am looking for a push in the right direction to the best way to handle my next step. I can research the choice once I'm sure of the best way to proceed.
Let me set this up for you:
Picture a 5 Dice game. Dice 1-5 are rolled separately, in order.
You proceed through the order, not being able to roll Dice number 2 before 1, or 3 before 2, etc....
However, there are circumstances on each of the first 4 Dice which could send you directly to the last Dice, bypassing the ones in the middle.
For example; Dice 1 is rolled. A condition showing me Dice 1 is rolled, allows me to roll Dice 2. A special outcome appears on Dice 2, now Dice 3&4 are no longer needed, and have to be locked from being able to be rolled (and scored as zero). The player is sent directly to Dice 5.
Once Dice 5 is rolled, the score is tallied and posted on a scoreboard.
The Scene is reset allowing the player to do it all over again for a set number of rounds.
The score should still be visible from all previous rounds. The scores from all rounds will be calculated into a final score at the end.
Here's my question:
Would I be better off using Attributes to control all of this, or a Table?
I can see how this could get lengthy with Attributes. I think I can see how this is situated better for a Table, using the logic I've seen in videos where the Levels are unlocked and progressed through
All of your comments and input is welcome. Thank you for taking the time to read this.
Doc
Comments
I would use attributes. I could see this being done with a few game attributes and some self attributes. You want to use a table for projects that contain a lot of data. For example, a list of all of the scores ever received. Another example would be a dictionary. While you can use a table for your project, it can get messy because you're dealing with individual cells instead of a single attribute state.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
I agree completely with @Braydo_SFX. All you need here is 5 attributes, one per die. Using tables for something like this would be pointlessly complicated.
Obviously this is only a very bare-bones example and your needs are probably much more complex, but attached is a demo. I'm sure the logic can be condensed down a bit, I didn't put too much thought into making it as efficient as possible.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline you're absolutely right. I can see now how this is better suited for Attributes rather than tables. I was over thinking the logic and behaviors.
Incredible how you can just whip something together like that. I've been running this through my head for days now. lol
Thanks again for your help.
It's just experience! Good luck with your game! I always like dice games so looking forward to seeing what you come up with!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support