Your cart is currently empty!
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:ย
Leave a Reply