Part 13: Getting the Playspace UI running

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:ย 


Comments

Leave a Reply

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