Firstly, A bit of other news related to this project – I submitted a talk for ServiceNow’s Knowledge 24 conference in Las Vegas to talk about the process of creating this app and it’s all booked in, so I’ll be appearing at the conference.  Come along if you want to hear about how it was all done and maybe say hi!

Now that I have deck building and game instantiation flows all running and creating all the relevant data structures to support a game, I can get down to creating the UI.  

I’ve outlined the basics in a graphic from my presentation:

There’s a few data elements involved in the playspace, so let’s talk through them all:

1. The game instance – the master record for the game containing references to the Player’s session records, the current active player, the current winning player, the current Turn and current total number of turns (knowing that the total can be increased or decreased by card behaviour), and references to the 3 Locations.

2. The Player session records – these contain a childlist of the Player’s cards as well as the player’s score, their current energy (reset each turn) their current turn and status of their turn, and number of cards drawn.

3. The Player’s Card instances – these show what card definition is actually related, Status (in hand, in deck, played to location, Destroyed, discarded), current cost and power (so they can be modified) as well as the original cost and power.

4. the Location Instances – these are hard-limited to 3 location records, and the location can be Hidden, Revealed or destroyed.  The location cards have a reference to the original card record too so we can track flows for the card behaviour.

5. The Location Slots – these are also hard-limited to 4 slots per player per location (as a related list) for the Location.  This makes it easy for us to build a UI that doesn’t rely on repeaters and we can hard-code Location Instances and Location slots – very handy!

I’ve started by creating the basic UI in a “debug” playspace that shows me things like location status as well as laying out all the spots I need to put cards.  For the player hand, I’m still doing a repeater that is based on a Data Resource that pulls back the array, but for everything else, I’ll hard-code.

It’s ugly – but it’s starting to come together: 


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *